Giter Club home page Giter Club logo

Comments (4)

Keats avatar Keats commented on September 24, 2024 1

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.

Keats avatar Keats commented on September 24, 2024

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.

holotrack avatar holotrack commented on September 24, 2024

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.

holotrack avatar holotrack commented on September 24, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.