How to manage links when localizing content. #2533
-
The team that I work on is looking at how we could localize the markdown files in our mkdocs-material deployment. One of the concerns is that the links coming for the software into the documentation will be different based on the language used. Is there a way to create a singular link name/id for a header that will work across all localized languages? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
You can use the attr_list extension to define custom slugs. (#2085) After enabling, you can just add |
Beta Was this translation helpful? Give feedback.
-
@michaelcrook did you have a look at the mkdocs-static-i18n plugin?. It handles link and reference localization automatically for you when you use it. I explained and demonstrated everything here if you want to give it a try. |
Beta Was this translation helpful? Give feedback.
You can use the attr_list extension to define custom slugs. (#2085)
After enabling, you can just add
{ #custom-ID }
to your headings to overwrite the generated slugs (#links).