Setup mkdocs-materials #7793
-
How can I switch from urls like docs.example.com/setup/docker.html to docs.example.com/setup/docker. How does that work? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
Can you please add some context to the setup? For example, which plugins are activated? |
Beta Was this translation helpful? Give feedback.
-
Hello @gh-repo-status-check, There is no official way to setup direct link to Similar discussions:
|
Beta Was this translation helpful? Give feedback.
Hello @gh-repo-status-check,
the way links are processed is related to the use_directory_urls config option. MkDocs generates static HTML pages, and it's either
.../docker.html
or.../docker/index.html
, where the latter can be opened with.../docker/
. Notice the/
at the end which "opens" the directory, and the web browser automatically loads theindex.html
file.There is no official way to setup direct link to
docker.html
pages without the.html
part. You could theoretically modify the links with a hook, however some plugins could rely on the.html
suffix for processing, so I wouldn't personally try to hack it. Therefore my recommendation is to enable the directory urls (which is the def…