What front matter property or mkdocs config value will let me control the url? #5161
-
I prefer to setup slug on my hugo blog because I can move content around and as long as the slug is unique I never break links. In mkdocs, I have subdirectories and these are automatically added to the slug. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 17 replies
-
This is not natively supported by MkDocs. FWIW, the |
Beta Was this translation helpful? Give feedback.
-
I would like this functionality as well.
|
Beta Was this translation helpful? Give feedback.
-
Thank you very much for the ideas you provided. May I ask if you know of any plugins that can achieve this? |
Beta Was this translation helpful? Give feedback.
This is not natively supported by MkDocs. FWIW, the
blog
plugin allows for explicitly settingslug
in front matter, but I don't know of a plugin that does the same for regular documents. Note that for moving content around, themkdocs-redirects
plugin can be used to set up proper redirects for stale URLs. You might also be able to implement this with a few lines of Python as part of a hook.