imfing / hextra

🔯 Modern, batteries-included Hugo theme for creating beautiful doc, blog and static websites
https://imfing.github.io/hextra/
MIT License
742 stars 177 forks source link

[Feature Request] Group blog posts by year and allow for changing the year. #452

Closed nisrulz closed 2 months ago

nisrulz commented 2 months ago

Feature Description

When someone has many blog posts, then having them grouped makes it easier to navigate.

Currently all the blog post links are listed in the same 1 page for a "type: blog" pages.

Problem/Solution

Having some sort of grouping by year would allow to split the list into consumable short lists.

Some sort of Sidebar navigation with list of possible years, would allow to navigate between them.

The list of years would need to be extracted by going through each post and then making a list with distinct years. Once the year is know, using the navigation the list would be filtered out to show only the posts from that year.

Alternatives Considered

While there is some possibility to do this manually, it would be nice if they was possible via the engine itself.

A manual solution would like:

In this process a lot of the feature that comes automatically with a blog type page would be lost i.e Readmore links, partial abstracts, RSS etc.

Additional Context

nisrulz commented 2 months ago

Nevermind, I played around and I was able to achieve this using some directory structuring and using

cascade:
  type: docs

I'll add some comment later for anyone else wanting to do this. Closing the issue now.