From 248fcaaabf88e0f95e5426889a85b94f012f1593 Mon Sep 17 00:00:00 2001 From: Miki Date: Fri, 14 Apr 2023 09:03:52 -0700 Subject: [PATCH] Use the modified dates of files in the sitemap (#3774) * The extracted dates are also added as a comment to the `head` of HTML pages Signed-off-by: Miki --- Gemfile | 4 +++- _config.yml | 5 +++++ _includes/head_custom.html | 2 ++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index cd42fda502..8a1a31f619 100644 --- a/Gemfile +++ b/Gemfile @@ -22,6 +22,7 @@ gem "jekyll-redirect-from", "~> 0.16" # If you have any plugins, put them here! group :jekyll_plugins do + gem "jekyll-last-modified-at" gem "jekyll-sitemap" end @@ -34,6 +35,7 @@ gem "wdm", "~> 0.1.0" if Gem.win_platform? # Installs webrick dependency for building locally gem "webrick", "~> 1.7" + # Link checker gem "typhoeus" -gem "ruby-link-checker" \ No newline at end of file +gem "ruby-link-checker" diff --git a/_config.yml b/_config.yml index f99b1f3905..f69efb79fa 100644 --- a/_config.yml +++ b/_config.yml @@ -202,10 +202,15 @@ anchor_links: true footer_content: plugins: + - jekyll-last-modified-at - jekyll-remote-theme - jekyll-redirect-from - jekyll-sitemap +# This format has to conform to RFC822 +last-modified-at: + date-format: '%a, %d %b %Y %H:%M:%S %z' + # Exclude from processing. # The following items will not be processed, by default. Create a custom list # to override the default setting. diff --git a/_includes/head_custom.html b/_includes/head_custom.html index 1a18be03bb..a6bc7b7a3b 100755 --- a/_includes/head_custom.html +++ b/_includes/head_custom.html @@ -12,3 +12,5 @@ {% else %} {% endif %} + +