Closed thejcannon closed 10 months ago
Hmm, so poking around mkdocs
and https://github.com/oprypin/mkdocs-gen-files, I suspect that that plugin ought to define on_nav
and allow customization. I'll file an issue over there and close one when the other is complete.
Nevermind, I think I got this working on this plugin, using the Files
provided by mkdocs
instead of scraping the docs_dir
directly.
I'll try and whip up a PR today :smile:
Keep in mind that under normal circumstances .nav.yml
wouldn't be included in Files
.
If I understand mkdocs-gen-files correctly, the files are temporarily created somewhere outside of docs_dir
. Maybe you can try to get my plugin to read the .nav.yml
file from there.
OK, today might be a stretch. I got it to respect generated .md files pretty easily.
Generated navs is a bit harder :smile:
:wave: Loving the plugin!
Currently also loving https://github.com/oprypin/mkdocs-gen-files, but noticed that if I generate navs, or pages referenced by my static navs, they don't end up making it to the generated docsite.
E.g.
mkdocs.yml
generate_reference_docs.py
along with:
Results in
Reference
being in the nav, but is "flat". No expand arrow.Additionally, the pages do exist,
/reference/global-options
is a valid URL and gives what I expect.