Produces empty title for year/month/day
jekyll-archives produces an empty "
# Returns a String (for tag and category archives) and nil for
# date-based archives.
def title
@title if @title.is_a? String
end
This is quite ugly though. Firefox, for example, will display the URL if the title is not set. Why not set a title like "Archive for year yyyy", "Archive for month ... of year yyyy", etc. Or easier to implement: "Archive for" and then append, year, month, day (whatever is available).
I’m generally not a fan of mixing Liquid and YAML, but in this instance it really would be very handy to just let the user specify an archives.title in _config.yml for us to parse as Liquid and use.
This would also allow users to format the date in a way that makes sense for their own site.
You can already specify a title using the layouts. I do that for my yearly archives:
title: {{ page.date | date: "%Y" }}
You can already specify a title using the layouts. I do that for my yearly archives:
title: {{ page.date | date: "%Y" }}
This doesn't work. You can't use Liquid in the front matter.
This doesn't work. You can't use Liquid in the front matter.
This is a post from 5 years ago. I no longer use this plugin.
EDIT: I removed it a year ago in my blog and I had Jekyll version 4.1 at that time. Things might have changed in newer releases.
@Exagone313 There was a plugin which permitted what you said, but it doesn't work with newer releases of Jekyll. Anyway, sorry, my first comment might have sounded a little aggressive, I'm just researching this topic and I might come with a fork / PR fork for this repo which permits some sort of title generation for date based archives.