Giter VIP home page Giter VIP logo

Comments (4)

Keats avatar Keats commented on May 18, 2024

Sections will use section.html as default template but you can change it by setting the template attribute in a _index.md front-matter.
Do you have an example of what you want to do? I'm not entirely sure I understand

from zola.

sebasmagri avatar sebasmagri commented on May 18, 2024

@Keats will posts that belong to a section use the section.html template? Can I have one section.html per section?

I want to have different kind of posts with different [extra] metadata and different layout and styles, so I was wondering I could use different sections for them having different templates for each section.

from zola.

Keats avatar Keats commented on May 18, 2024

Pages are separate from sections, you can't automatically apply a template to all pages in a section right now. All the data you put in the front-matter of a _index.md file only applies to the index page of that section. This might change once sorting per section etc is added but not right now.

You can have as many templates as you want, for example the following:

tutorials
|- _index.md  // could have tutorials.html as template for the index
help
|- _index.md // could have help.html as template for the index

All pages will default to page.html as template but you can override it on a case by case basis by setting the template variable in their frontmatter

from zola.

sebasmagri avatar sebasmagri commented on May 18, 2024

Got it. Sorted it out this way.

from zola.

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.