You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, the "About" page is available directly under https://jbirnick.net/ and this is how I want it. (No redirect, the root should just be the "About" page.)
How can I implement this behavior in Zola? Because it forces me to make the root a section and not a page... So I had two ideas of solving that:
Just put my content for "About" in the section _index.html and use the frontmatter template = "page.html". However, I don't like this, because it is semantically incorrect. I don't want "About" to be a section, it's a page. For example, I can't use the same page-specific frontmatter then, such as updated. In fact, it might not even work, because my page.html template might use the page-specific frontmatter, which will result in an error when called with a section.
Make _index.html essentially empty with render = false, put "About" in about.md and somehow tell Zola that it should be mapped to the root path. However, I don't see a way to do this, as only the slug part of the path can be set, right?
Any help is greatly appreciated.
Sidequestion: Why is every SSG forcing me into the difference of "sections" and "pages" and forces the root to be a section? I somehow get it for Hugo because it partially uses paths for "semantics", in the sense that for example also templates are chosen by path. However, I thought Zola is more un-opinionated. For example, templates are not chosen by path anyways, but have to be specified in the frontmatter. EXCEPT the difference between section and page, for which the path is used, and where some things are enforced. Why? Why not eliminate the difference, have just one concept of page, and if the user wants to make a page which lists all subpages then they can make a specific template for that and call template = "list.html" or so.
The text was updated successfully, but these errors were encountered:
jbirnick
changed the title
Have home page being a page and not a section
Have root being a page and not a section
Jun 27, 2024
I'm currently porting my website https://jbirnick.net to Zola.
It consists of 4 main pages: About, Blog, Conferences, Links. The latter three are available under respective sub URLs, i.e.:
Blog: https://jbirnick.net/posts/
Conferences: https://jbirnick.net/conferences/
Links: https://jbirnick.net/links/
However, the "About" page is available directly under https://jbirnick.net/ and this is how I want it. (No redirect, the root should just be the "About" page.)
How can I implement this behavior in Zola? Because it forces me to make the root a section and not a page... So I had two ideas of solving that:
Just put my content for "About" in the section
_index.html
and use the frontmattertemplate = "page.html"
. However, I don't like this, because it is semantically incorrect. I don't want "About" to be a section, it's a page. For example, I can't use the same page-specific frontmatter then, such asupdated
. In fact, it might not even work, because mypage.html
template might use the page-specific frontmatter, which will result in an error when called with a section.Make
_index.html
essentially empty withrender = false
, put "About" inabout.md
and somehow tell Zola that it should be mapped to the root path. However, I don't see a way to do this, as only the slug part of the path can be set, right?Any help is greatly appreciated.
Sidequestion: Why is every SSG forcing me into the difference of "sections" and "pages" and forces the root to be a section? I somehow get it for Hugo because it partially uses paths for "semantics", in the sense that for example also templates are chosen by path. However, I thought Zola is more un-opinionated. For example, templates are not chosen by path anyways, but have to be specified in the frontmatter. EXCEPT the difference between section and page, for which the path is used, and where some things are enforced. Why? Why not eliminate the difference, have just one concept of page, and if the user wants to make a page which lists all subpages then they can make a specific template for that and call
template = "list.html"
or so.The text was updated successfully, but these errors were encountered: