From c9949b7153e6ed4ef70152c94648e4e2b3919922 Mon Sep 17 00:00:00 2001 From: Jason Becker Date: Tue, 7 Nov 2023 08:58:40 -0700 Subject: [PATCH] Update index.json to include date_modified This uses Hugo's [.Lastmod](https://gohugo.io/methods/page/lastmod/) to add the optional property of JSON Feed 1.1 [date_modified](https://www.jsonfeed.org/version/1.1/) based on [Rick Cogley's request](https://help.micro.blog/t/add-date-updated-to-feed-json/2267/2). --- layouts/index.json | 1 + 1 file changed, 1 insertion(+) diff --git a/layouts/index.json b/layouts/index.json index a3cd793..573cc1d 100644 --- a/layouts/index.json +++ b/layouts/index.json @@ -23,6 +23,7 @@ {{- $s := replace $s "\\u0026" "&" }} "content_html": {{ $s }}, "date_published": "{{ .Date.Format "2006-01-02T15:04:05-07:00" }}", + "date_modified": "{{ .Lastmod | time.Format "2006-01-02T15:04:05-07:00" }}", "url": "{{ .Permalink }}" {{- with .Params.categories -}} ,