I voluntarily work on a Ghost website of an author and columnist (who recently passed away), which has around 4,000 posts with 30+ years history. Readers often want to check his articles on specific dates (years/month). And this need brings me to the same point again, about how to make a chronological archive or index page in Ghost.
I checked the forum once again to see if we have something that I missed, but unfortunately couldn’t find any relevant solution. The most popular and suggested solution relies on listing “all” articles in a page, and show them under Year/Month titles with some CSS trick. But I think it would be not nice to fetch 4k rows from db, show all post links in a single HTML.
As far as I can see, we also don’t have any query options on API to list “years” of posts, so we can show a year list, then -maybe- filter posts by years.
I’m now in a decision point to choose a path for a solution. The options that I see:
- Implement an external search, which can filter by years, or even list years/months as filtering points. So a solution completely outside of Ghost.
- Create static pages (with collections) for each year, then make another static index page to link them.
- Check deeper on Ghost routing/templating dynamics to try adding date-releated contexts to them, so we can have dynamic data, like
{{# get "years" ... }}(which would return the years of active posts with optionally given filters), or filtering withgroup_by, or having{{ year }}parameter as path param in route definitions, etc.
I would like to select the last option, as it would help every single Ghost user (and also template developers) who will need making this type of pages, but I have 2 concerns:
- This may require an extensive work and I don’t even know if Ghost team would like to merge a feature like this.
- I don’t know the demand of a feature like this. I see handful of posts in this forum about this need, but some are happy with a static page, or some fccus on other things.
So, I would like to ask here for the opinions. Do you think some helpers, built-in solutions in Ghost for a chronological index page is a real need? Or do you think this is too niche, or too advanced for most of the Ghost publishers, so solving outside of the Ghost fits better? Or do you already have a practical solution for that use case?
Thanks in advance for your opinions. (Also for your patience and time to read this long post
)