-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
Scratch and Output Formats #3592
Labels
Milestone
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I use partials for inlining svg defs, for example:
The goal is to inline a svg defs just once per page, as i reference them with xlink:href. This is what the if statement is made for and that worked well before activating another output format like AMP, which is also using this icon partial in its template.
It seems that the vars defined in Scratch are "reseted" per page, but if you use multiple Output Formats, they are shared and not reseted. The undesired behaviour in my case: Either on the HTML or AMP version of the same page, which is rendered after the other (which is random) the var is already set to true and the svg def isn't rendered.
This also doesn't work:
The solution would be either a proper reset of the Scratch vars for every Output Format. Or a page variable that tells me which output format is currently rendered (or extension) and that i can use in an if statement. Or maybe something else.
The text was updated successfully, but these errors were encountered: