Skip to content

How to put a range of dates for published label? #2706

Answered by mmistakes
ayousuf23 asked this question in Q&A
Discussion options

You must be logged in to vote

The published field is determined by page.date which you either specify directly in a post's YAML Front Matter, or Jekyll assigns it for you automatically based on the filename. e.g. 2020-10-07-my-post.md would have a page.date of 2020-10-07 which this line runs through Jekyll's date filter here to generate October 7, 2020.

You could customize the theme, add your own YAML Front Matter like published_range: "September-October 2020" and then use something like this where you want the range to appear on the page:

Published: {{ page.published_range }}

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by mmistakes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #2706 on December 09, 2020 03:27.