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

In Zola templates that extend another template, variables declared at top-level are silently ignored #2595

Open
LunarEclipse363 opened this issue Aug 3, 2024 · 2 comments

Comments

@LunarEclipse363
Copy link
Contributor

Bug Report

I felt this deserves a new issue that's specifically focused on the UX problems rather than trying to get the one I made previously edited and/or reopened.

Environment and steps to reproduce

See #2485

Expected Behavior

Zola exits with an error, explaining that you cannot declare variables outside of blocks when extending another template.

Current Behavior

The variable declarations are silently ignored, producing either confusing error messages (that tell you nothing about the root cause of the problem) or unexpected output.

@Keats
Copy link
Collaborator

Keats commented Aug 3, 2024

We could add an error for that in the next version of Tera but that's not a Zola issue itself.

@LunarEclipse363
Copy link
Contributor Author

Sounds good, I think this issue should be kept around until a fix makes its way to Zola though.

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