From 50026a1a42d32ffc4f5fb87218ab4e693d23c5a2 Mon Sep 17 00:00:00 2001 From: Martin Costello Date: Thu, 4 Apr 2024 14:46:49 +0100 Subject: [PATCH 1/2] Fix feed validation warning Add `type="html"` to the `` tag. --- source/feed.xml.builder | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/feed.xml.builder b/source/feed.xml.builder index a9b3886..2cb9e7c 100644 --- a/source/feed.xml.builder +++ b/source/feed.xml.builder @@ -6,7 +6,7 @@ xml.feed "xmlns" => "http://www.w3.org/2005/Atom", "xml:lang" => "en-GB" do xml.id URI.join(site_url, blog.options.prefix.to_s) xml.link "href" => URI.join(site_url, blog.options.prefix.to_s) xml.link "href" => URI.join(site_url, current_page.path), "rel" => "self" - xml.rights "© " + config[:blog_author] + " 2014-" + Time.now.utc.strftime("%Y") + xml.rights "© " + config[:blog_author] + " 2014-" + Time.now.utc.strftime("%Y"), "type" => "html" xml.updated(blog.articles.first.date.to_time.iso8601) unless blog.articles.empty? xml.author do xml.name config[:blog_author] From dd44b0bc38394c53614d77a1b250164bd813d69e Mon Sep 17 00:00:00 2001 From: Martin Costello Date: Thu, 4 Apr 2024 14:54:58 +0100 Subject: [PATCH 2/2] Use Git commit date for files Retain the original file information for use with updated timestamps for content. See https://stackoverflow.com/a/60984318/1064169. --- .github/workflows/build.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 64cec39..39dcf86 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -32,6 +32,11 @@ jobs: with: ruby-version: 3.3 + - name: Update file timestamps + shell: bash + run: | + git ls-files | xargs -I{} git log -1 --date=format:%Y%m%d%H%M.%S --format='touch -t %ad "{}"' "{}" | $SHELL + - name: Build blog shell: pwsh run: |