-
Notifications
You must be signed in to change notification settings - Fork 991
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question: How to organize news feed items? #2513
Comments
I think I have a similar use case and have also not figured out how to achieve this. The general requirements are:
My specific for this is for a "/now" page (the section) that includes the full text of periodic updates (the pages). But I don't need or want the updates themselves to also have their own unique url. My impression is that Zola doesn't support this, but perhaps someone here knows better? |
Would making the subsections transparent with render = false for the pages work? |
I tried something like that where I set
But Regardless, I've kind of decided it's mostly fine to have each of these pages get their own unique url and I just won't link to them. Worst case it just means that they can be referred to individually by url even if that's not something I'm likely to need to do. |
There is #2585 that could solve that issue |
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 viacontent/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 undercontent/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 usingignore_contents
inconfig.toml
, but then the content disappears completely. I tried settingrender = 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!
The text was updated successfully, but these errors were encountered: