Skip to content

How does the Updated timestamp work? #3049

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

You must be logged in to vote

You need to add some YAML front matter for the updated timestamp. This works on post's which automatically have a date based off of the filename you give it or if you add something like this to your front matter:

---
date: 2021-07-07
---

To get the updated value you need to add last_modified_at to front matter:

---
last_modified_at: 2021-07-07
---

Many of the core Jekyll plugins utilize last_modified_at timestamps which is why I choose that variable name. There is a Jekyll plugin that automatically adds that value based off of the last time the file was modified if you don't want to manually at last_modified_at datetimes to your posts and pages.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@mmistakes
Comment options

@pmatulis
Comment options

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