-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Load YAML files safely #6897
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
Load YAML files safely #6897
Conversation
Use a custom YAML loader to ignore all the unknown tags. This allow us to support YAML files that have custom tags that are irrelevant for Read the Docs) but are required for MkDocs to build the documentation properly.
Shouldn't this add a test that it actually ignores unknown tags? |
I'm still not convinced this is a great UX for users. Their YAML files will now load but be missing data that they would expect to be in it. I understand the use-case for parsing a users mkdocs.yml, but we shouldn't ever support this for our own config file, right? |
That's true. The correct approach would be to ignore these tags when reading the mkdocs.yml but keep using the regular |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 with passing tests.
Use a custom YAML loader to ignore all the unknown tags. This allow us to
support YAML files that have custom tags that are irrelevant for Read the Docs)
but are required for MkDocs to build the documentation properly.
Close: #6889