Comments (4)
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
from tera.
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.
from tera.
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?
from tera.
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.
from tera.
Related Issues (20)
- Excessive memory usage of Tera HOT 3
- linebreaksbr is not safe - add `html_encode` filter? HOT 1
- `default` filter: make the `value` optionnal and add `d` alias HOT 1
- Use of `(` and `)` to specify order of operations. HOT 2
- Weird behavior with duplicate variable names HOT 1
- Removing space between HTML tags HOT 1
- Macro names can have underscores but not hyphens HOT 1
- Macro from another macro HOT 1
- More complete Display implementation for Error HOT 5
- Missing a few git tags? HOT 1
- [Question] Help understanding the `indent` built-in
- How to use in the template has . variables
- Round a number with precision not work as expected! HOT 2
- Strongly recommend adding asynchronous call functionality. HOT 1
- Build problem with 1.20.0 HOT 3
- On Linux, the tera could not be built in my project by dylib
- Is this really the shortest attribute safe get/fetch one-liner HOT 2
- Don't return an error if variable is missing in the context HOT 3
- Reload, but reset on fail
- Template fragments HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tera.