Closed holotrack closed 11 months ago
I don't see any macro in the code sample?
How that "%if" is working/generating site after site generation/deployment?
It is not present after site generation, no JS involved or anything.
So how its working, how its regenerating site depends on condition? I saw peoples using it t change classes depends on which site you are, normaly we need JS for it so how it is solved here that site is changing look depends on macro condition? Or am i missing something obvious here?
Here is another example of such usage: https://github.com/pawroman/zola-theme-terminimal/blob/master/templates/macros/menu.html
And its working that way its changing look of menu item, and wondering how its working after site generation?
Each page in that menu will be rendered to HTML. When they get rendered, zola will know the current_path/url and you can toggle the menu for that page. It's not a single output page, it's n
pages
Each page in that menu will be rendered to HTML. When they get rendered, zola will know the current_path/url and you can toggle the menu for that page. It's not a single output page, it's
n
pages
Ahh thank you, this is answaring my question.
Hello. I can not find how Tera macros are working. Mainly what im asking about, how its happening if i have eg Zola STATIC pregenerated page and i can with macro change class depending on which site is open raight now. Example code doing this:
How that "%if" is working/generating site after site generation/deployment? Is there some hidden javascript or how its happening?