Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I make mkdocs support Markdown documentations in multiple locations?

MkDocs is a great tool for documentation based on Markdown language. However, currently it only supports documentations in one specific location as this document shows (see mkdocs configuration):

docs_dir The directory containing the documentation source markdown >files. This can either be a relative directory, in which >case it is resolved relative to the directory containing your configuration file, or it can be an absolute directory path from the root of your local file system.

default: 'docs'

However, in my case my Markdown files are located in several locations, and they do not share the same parent directory. Any ideas on how I can make mkdocs search for several documentation folders?

like image 680
feelfree Avatar asked Jan 23 '26 17:01

feelfree


1 Answers

If you work on linux you can easily make a general docs folder and use softlinks ln -s /real/path/for/part1 docs/part1 to bring them together. Now mkdocs will work like everything is in the same parent directory.

On Windows the same may be possible using mklink.

like image 143
Alinex Avatar answered Jan 27 '26 02:01

Alinex



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!