-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MkDocs 1.5 and the !relative YAML tag #10803
Comments
Ad mentioned in readthedocs/addons#72, we will remove our overrides from the mkdocs.yml file. You can also make use of the build.command feature to run mkdocs with any options you want https://docs.readthedocs.io/en/stable/build-customization.html#override-the-build-process, RTD won't override the config file when using that option. |
In case you want to try out this new Read the Docs addons approach, you can opt-in by enabling beta addons in your project from the project's admin page using the new beta dashboard at https://beta.readthedocs.org. I'd appreciate any feedback you may have regarding this approach. Eventually, this new "addons approach" will be the default for all the projects and Read the Docs will not manipulate the build process anymore, allowing custom tags like |
We already removed this override in #11206, so users can use We wrote a blog post about this at https://about.readthedocs.com/blog/2024/03/mkdocs-yaml-manipulation/ |
What's the problem this feature will solve?
MkDocs 1.5 introduced the
!relative
YAML custom tag: https://www.mkdocs.org/user-guide/configuration/#paths-relative-to-the-current-file-or-site. It is used to declare paths in the config as relative to the config file directory, the docs directory, or the current Markdown page directory. This was needed for Markdown extensions which know nothing about MkDocs, whereas plugins receive the config file path and therefore are able to compute relative paths themselves.Paths need to be relative for the
-f
option ofmkdocs serve/build
to work propertly. Relying on the current working directory is not compatible with this option.Describe the solution you'd like
I searched the issues and PRs but couldn't find anything related, so I assume support for this custom tag was not implemented, and your safe YAML loader would probably fail to load/restore it?
The text was updated successfully, but these errors were encountered: