Skip to content

Using --config-file to call two different yaml files that include different index files? #8236

Closed Answered by mocdaniel
DennisJDufrene asked this question in Q&A
Discussion options

You must be logged in to vote

A quick search in the mkdocs documentation didn't reveal an option to do this, especially not in the context of mkdocs serve - it canonically renders the file index.md at the root level of your docs_dir at / of your docs, or falls back to a 404.

The docs regarding file layout in mkdocs can be found here.

What you could do during build-time is symlinking/copying the respective index-{variant}.md to index.md by providing the needed variant via e.g. ENV variable, then continuing to build the static docs referencing the mkdocs-{variant}.yml.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@kamilkrzyskow
Comment options

Answer selected by kamilkrzyskow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants