welpo / tabi

A modern Zola theme with search, multilingual support, optional JavaScript, a perfect Lighthouse score, and a focus on accessibility.
https://welpo.github.io/tabi/
MIT License
97 stars 32 forks source link

Turn off (disable or hide) "blog" section on the main page #316

Closed stalkerGH closed 1 month ago

stalkerGH commented 1 month ago

Is it possible to disable (hide) the “blog” section on the main page? I would like only the “projects” section to be visible. I know that I can turn off the appearance of links in the menu, such as to the blog or archive, but I'm talking about the main page.

welpo commented 1 month ago

You want to have a blog section but not show it on the main page? Or not have a blog section at all?

stalkerGH commented 1 month ago

I don't know what is possible (if any). My page will be not "pure blog" but I like "projects" section idea - every post illustrated with thumbnail.

welpo commented 1 month ago

Neither option is possible now. Will look into adding this option later!

stalkerGH commented 1 month ago

Thanks for reply. It's not very important feature but would be nice to have an option to enable/disable certain sections by simple key = true/false value in configuration file.

welpo commented 1 month ago

Rather than an option to enable/disable, my idea is:

So users only need to set one variable, instead of the path to projects/blog as well as the "enable this feature" flag.

I've implemented the base idea, but now I need to fix some CSS issues. Will be ready soon.

welpo commented 1 month ago

Just added the feature in #317. Let me know if you encounter any issues!

stalkerGH commented 1 month ago

Thank you. It turns off blog posts when I click on "blog" menu entry (I got empty page). But I'd like to turn off "Latest posts" section on main page too. Could you add such option too?

welpo commented 1 month ago

That should not happen. What does your _index.md look like?

On tabi's demo, if I remove the section_path, the blog section still works fine.

Are you trying to serve posts from the base url instead of blog/? If so, that will need another change.

stalkerGH commented 1 month ago

OK, I got it. I removed paginate_byfrom _index.md in "blog" directory but forgot about _index.md in "content". I removed section_path and "latest posts" dissapears from main page.

Thank you once again for blazing fast commits :)

welpo commented 1 month ago

Happy to hear! 🙌