Open VinzentE opened 8 years ago
From the looks of it it shouldn't work with vanilla mkdocs
either (since there appears to be no pages
data structure). If it does, though, the problem may indeed be with mkdocs-pandoc
. Can you share your documentation or a minimum example to reproduce the problem with?
Hi Johannes,
thanks for the reply. I just tried to run it with a brand new "mkdocs new mytest" but still getting the exact same error. Now sure what exactly I could provide? Pls. guide me and I will send you the info you need. We could also do a quick call? Thanks for your efforts Vinz
Apparently mkdocs assumes the following entry in your mkdocs.yml if there's no pages
data structure:
pages:
- 'SITENAME': 'index.md'
(with "SITENAME" substituted by the value of site name
).
Add these lines and it should work for mkdocs-pandoc as well (I'll try to add similar behaviour to mkdocs-pandoc some time this week).
Great - thanks! I got it to work. But there is on issue: We have set up the documentation to be in folders and subfolders (= headings and subheadings). We don't keep track of that in the yaml. Now when I tried the compilation, it only printed the index page - I assume as that was the only one in the yaml file.
Any idea on how I can just print everything in the the (sub)folders as well?
Any idea about my last question? As i still can't get it to work ...
Thanks
I ran into the same issue. You can use the repo at https://github.com/vitusventure/5thSRD (not mine) as a test case. :-) It works as expected with mkdocs, but not with mkdocs2pandocs.
Sorry, I must have missed the notification about this one :-(
Yes, mkdocs2pandoc relies on the component files being in the YAML file, so you'll have to add them manually or generate it as part of your documentation's build process.
Hi there,
I just tried to convert my mydocs docu but I am getting these errors:
Traceback (most recent call last): File "/usr/local/bin/mkdocs2pandoc", line 11, in
sys.exit(main())
File "/usr/local/lib/python2.7/site-packages/mkdocs_pandoc/cli/mkdocs2pandoc.py", line 80, in main
for line in pconv.convert():
File "/usr/local/lib/python2.7/site-packages/mkdocs_pandoc/pandoc_converter.py", line 103, in convert
pages = self.flatten_pages(self.config['pages'])
KeyError: 'pages'
Appreciate any help!
thanks