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 with group_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 )
chronological archives are such a basic feature on other platforms that the lack of it in ghost always felt like a blind spot to me
just wanted to say I really appreciate you dedicating your time to this
They’d have to be channels, right? Because a post can only be in one collection.
I’d rather have an explicit filter than it being magic, since I might in fact have two archives I want to group by year/month… :) So more like filter:tag:mytag+published_at:year
We’re currently working on a newsletter archive and the requirements are pretty similar. Would be great if there was some sort of native support.
So for listing years and months and posts under them, I’m planning to use static stuff and a year filtered page using published_at (range). But there’s no dynamic rendering at least for now, except that I might do a custom helper for some of this (if possible).
I had to split the tags into two buckets because I’ve got so many. It basically works, but I haven’t deployed it on my live site yet. It’s still a little wonky. I’m running the Braun theme. I doubt that this would work on other themes, but I could be wrong.
I do this - very crudely - using tags (separate year and month tags), and then have a summary page allowing their retrieval. Ugly but functional. I tagged several hundred articles when importing from WP, and continue to tag new posts as they’re created. Clearly, I thought this was useful, so I’d be interested to see a more elegant solution.
However, relatively few readers appear to access my posts archived like this. I write about a seasonal topic, and assumed readers might want to refer back to previous posts from May, or posts from 2017. Few do. Maybe it’s just my writing ?
In contrast, I do use it … to find stuff I’ve written in the dim and distant past. So, in answer to your questions Would it be useful? Yes. Is it too niche? No. Do I have a practical solution? No, at least not for doing it retrospectively or automatically.