Description
I'm working on porting my old PHP/SQL site to zola, and I really like the simplicity and speed so far. One thing I haven't figured out yet though, is how to handle/organize "sub-page" sized content. The root index of my site has a "news feed" (see https://dubrowgn.com). The data for these look a lot like a page, but several are rendered together in a paginated fashion. I don't want each one rendered in its own page.
What I tried is creating pages under content/news
, and just rendering them via content/news/_index.md
. The rendered output looks like what I want, but I want the content to show up as the root index (e.g. https://dubrowgn.com, not https://dubrowgn.com/news). I can't figure out how to do this without breaking the rest of the site. The section logic tries to include all the site contents instead of just stuff under content/news
. I also can't figure out how to prevent the individual news items themselves from rendering (e.g. no https://dubrowgn.com/news/foo/index.html). I looked at using ignore_contents
in config.toml
, but then the content disappears completely. I tried setting render = false
on the news items, but that didn't work either.
Another idea I had was to just call get_section(path="news/_index.md")
, but I can't figure out how to do pagination with that. It also still tries to render the individual news item pages.
The only other potential solution I see is to (ab)use taxonomies somehow, but I would prefer not to have to manually "tag" all my news items. It still doesn't prevent rendering of individual news item pages either.
I've spent enough time at this point I figured maybe I should just ask. What's the best way to handle "sub-page" content in zola? Ideally, something that's nice to organize/maintain, doesn't render individual pages, handles pagination, and can be rendered to the site's root index.
Thanks!