Fix #2598, shift to last_modified_at instead of last_updated. (#3493)

Use `last_modified_at` rather than `last_updated`. So that the
jekyll-sitemap plugin automatically looks for the standard
`last_modified_at` front matter field to generate the `<lastmod>` tag in
your `sitemap.xml`.

It fixes [#2598](https://github.com/alshedivat/al-folio/issues/2598) 

Also, it preserves backward compatibility, as the updated metadata logic
prioritizes the `page.last_modified_at`, and defaults to
`page.last_updated`.
This commit is contained in:
Jaskirat Singh Maskeen 2026-01-31 21:08:24 +05:30 committed by GitHub
parent e6542e3f4b
commit d86331af3c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 2 deletions

View File

@ -19,7 +19,8 @@ layout: default
<p class="post-meta">
Created on {{ page.date | date: '%B %d, %Y' }}
{% if page.author %}by {{ page.author }}{% endif %}
{% if page.last_updated %}, last updated on {{ page.last_updated | date: '%B %d, %Y' }}{% endif %}
{% assign last_date = page.last_modified_at | default: page.last_updated %}
{% if last_date %}, last updated on {{ last_date | date: '%B %d, %Y' }}{% endif %}
{% if page.meta %}• {{ page.meta }}{% endif %}
</p>
<p class="post-tags">

View File

@ -2,7 +2,7 @@
layout: post
title: a post with vega lite
date: 2024-01-27 00:20:00
last_updated: 2024-04-14 04:30:00
last_modified_at: 2024-04-14 04:30:00
description: this is what included vega lite code could look like
tags: formatting charts
categories: sample-posts