Use a base_URL or a slash instead of relative path for internal resources #4660
-
Hi @squidfunk thx for your job ! 🙏 I was wondering if it would be possible to use a global variable for the ex/ just being able to write Or maybe there's already a Thanks for you help, |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
This is essentially a MkDocs question, as it's not specifically related to Material for MkDocs. As I understand, there are several plugins for managing URLs, some of which allow for absolute URLs. Check out the MkDocs plugin wiki. |
Beta Was this translation helpful? Give feedback.
-
i use mkdocs-abs-rel-plugin, it's nice plugin. But after using this plugin, you can only use absolute link. |
Beta Was this translation helpful? Give feedback.
-
With version 1.6.0 validation:
absolute_links: relative_to_docs https://www.mkdocs.org/about/release-notes/#validation |
Beta Was this translation helpful? Give feedback.
With version 1.6.0
relative_to_docs
value forvalidation
was introduced, which allows to use the absolute paths starting with/
as described in the OP post:https://www.mkdocs.org/about/release-notes/#validation
https://www.mkdocs.org/user-guide/configuration/#validation