mkdocs-same-dir

MkDocs plugin to allow placing mkdocs.yml in the same directory as documentation

MIT License

Downloads
20.3K
Stars
36
Committers
2

mkdocs-same-dir

Plugin for MkDocs to allow placing mkdocs.yml in the same directory as documentation

pip install mkdocs-same-dir

Usage

Activate the plugin in mkdocs.yml, along with actually changing docs_dir (normally, MkDocs absolutely wouldn't let you set it to .):

site_name: foo
docs_dir: .
site_dir: ../site

plugins:
  - search
  - same-dir

and now you can move this mkdocs.yml into your docs directory, or move your docs alongside mkdocs.yml.

See example layout

Important notes

Another necessary effect of this plugin is that files directly at the root of the docs dir will no longer be picked up, unless they are Markdown files.

And note that the implementation of this plugin is a huge hack that monkeypatches MkDocs' internals. But I pledge to keep up with MkDocs updates and keep it working as long as that's still possible.

Package Rankings
Top 6.37% on Pypi.org
Badges
Extracted from project README's
PyPI License GitHub Workflow Status