如何让 mkdocs 在多个位置支持 Markdown 文档?

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

MkDocs 是一个非常棒的基于 Markdown 语言的文档工具。但是,目前它仅支持一个特定位置的文档,如本文档所示(请参阅 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'

但是,在我的例子中,我的 Markdown 文件位于多个位置,并且它们不共享相同的父目录。关于如何让 mkdocs 搜索多个文档文件夹的任何想法?

如果您在 linux 上工作,您可以轻松地创建一个通用 docs 文件夹并使用软链接 ln -s /real/path/for/part1 docs/part1 将它们放在一起。现在 mkdocs 将像一切都在同一个父目录中一样工作。

在 Windows 上使用 mklink 也可能实现同样的效果。