jgrassler / mkdocs-pandoc

[unmaintained] mkdocs -> pandoc converter: use this fork https://github.com/twardoch/mkdocs-combine
Apache License 2.0
107 stars 39 forks source link

KeyError: 'markdown_extensions' #4

Closed mkoertgen closed 8 years ago

mkoertgen commented 8 years ago

Followed usage to install the stable version of mkdocs-pandocs. When calling mkdocs2pandoc i get an error relating to markdown-extensions

Traceback (most recent call last):
  File "C:\python\Scripts\mkdocs2pandoc-script.py", line 9, in <module>
    load_entry_point('mkdocs-pandoc==0.2.3', 'console_scripts', 'mkdocs2pandoc')
()
  File "C:\python\lib\site-packages\mkdocs_pandoc\cli\mkdocs2pandoc.py", line 69
, in main
    encoding=args.encoding,
  File "C:\python\lib\site-packages\mkdocs_pandoc\pandoc_converter.py", line 52,
 in __init__
    for ext in self.config['markdown_extensions']:
KeyError: 'markdown_extensions'

I am not quite sure what this means. Did i do something stupid which can be fixed easily?

jgrassler commented 8 years ago

Ah, good catch :-)

I'm the one who did the stupid thing there: I failed to check for a nonexistent mkdocs_extensions in mkdocs.yml (and so far everyone appears to have used one extension or another so it did not become apparent until now). I'll fix it. Until the fix is ready you should be able to work around this with the following two lines in your mkdocs.yml:

markdown_extensions:
   - toc
jgrassler commented 8 years ago

Fixed in https://github.com/jgrassler/mkdocs-pandoc/commit/b469cbb415614427527304fb51ce65e8bf96301b and the new 0.2.4 release.

mkoertgen commented 8 years ago

Woah, that was a quick response. Thx a lot. I will check this out soon