Skip to content

Commit

Permalink
Add markdown extenions: checklist
Browse files Browse the repository at this point in the history
  • Loading branch information
tankywoo committed Aug 4, 2018
1 parent 1eac72c commit 55c38a1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@ ordereddict==1.1
watchdog==0.8.3
pytz==2018.5
tzlocal==1.5.1

# markdown 3rd extensions
markdown-checklist
4 changes: 4 additions & 0 deletions simiki/generators.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,13 +262,17 @@ def _set_markdown_extensions(self):
markdown_extensions_config.update(self.site_config["markdown_ext"])

markdown_extensions = []
# add builtin markdown extensions
for k, v in markdown_extensions_config.items():
ext = import_string("markdown.extensions." + k).makeExtension()
if v:
for i, j in v.items():
ext.setConfig(i, j)
markdown_extensions.append(ext)

# add 3rd markdown extensions
markdown_extensions.append('markdown_checklist.extension')

return markdown_extensions

def get_relation(self):
Expand Down

0 comments on commit 55c38a1

Please sign in to comment.