aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authorYuchen Pei <me@ypei.me>2019-03-19 15:50:37 +0100
committerYuchen Pei <me@ypei.me>2019-03-19 15:50:37 +0100
commit7e4d75759c13da6df3fa80f28a310dc780acc03c (patch)
tree0875ea3a035d742b41319db7173d68b0da4f5dbd /engine
parentef11d59204d46388048ada5cd1cc5f850c960549 (diff)
added table of contents
Diffstat (limited to 'engine')
-rw-r--r--engine/engine.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/engine/engine.py b/engine/engine.py
index c60cedc..f6d4be4 100644
--- a/engine/engine.py
+++ b/engine/engine.py
@@ -21,7 +21,7 @@ def item_from_path(path):
res.setdefault('name', os.path.basename(x))
if ext in ['.md', '.markdown']:
logging.info('Converting {}...'.format(path))
- res['body'] = pypandoc.convert_text(matchres.group(2), 'html', format='md', extra_args=['--mathjax'])
+ res['body'] = pypandoc.convert_text(matchres.group(2), 'html', format='md', extra_args=['--mathjax', '-s', '--toc'])
elif ext == '.wiki':
logging.info('Converting {}...'.format(path))
res['body'] = pypandoc.convert_text(matchres.group(2), 'html', format='vimwiki')