Skip to content
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

Allow to load_data from yml in addition to yaml? #1958

Closed
bast opened this issue Aug 9, 2022 · 1 comment
Closed

Allow to load_data from yml in addition to yaml? #1958

bast opened this issue Aug 9, 2022 · 1 comment

Comments

@bast
Copy link
Contributor

bast commented Aug 9, 2022

This is not a bug report but rather a change proposal which I could possibly code/send.

Zola allows to load_data from yaml files (in addition to other formats) and this is a really nice recent addition (thanks!):
https://www.getzola.org/documentation/templates/overview/#load-data

But many YAML files end with *.yml and not *.yaml and Zola does not seem to recognize these as YAML files.

Would it make sense to load_data from files/URLs ending with either *.yaml or *.yml via the YAML parser? If yes, I could try to send a patch.

But maybe this already works and I just misunderstood the documentation and/or sources and/or my local testing of a page.

@Keats
Copy link
Collaborator

Keats commented Aug 9, 2022

That's a very simple patch, no issues doing a PR for it.

Keats pushed a commit that referenced this issue Aug 10, 2022
previously only files with *.yaml suffix were recognized as YAML
@Keats Keats closed this as completed in f61e1ba Aug 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants