From b2ed6c682333951b2d79e3fd16db34647193b4f6 Mon Sep 17 00:00:00 2001 From: Youssef Date: Sat, 6 Jul 2024 16:48:36 +0200 Subject: [PATCH] sitemap.xml update --- Gemfile | 2 ++ Gemfile.lock | 1 + _config.yml | 2 ++ sitemap.xml | 28 ---------------------------- 4 files changed, 5 insertions(+), 28 deletions(-) delete mode 100644 sitemap.xml diff --git a/Gemfile b/Gemfile index 2c927ee..ec6e0e5 100644 --- a/Gemfile +++ b/Gemfile @@ -33,3 +33,5 @@ gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin] gem "http_parser.rb", "~> 0.6.0", :platforms => [:jruby] gem "webrick", "~> 1.8" + +gem 'jekyll-sitemap' diff --git a/Gemfile.lock b/Gemfile.lock index 811316c..85fbdf3 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -302,6 +302,7 @@ DEPENDENCIES github-pages http_parser.rb (~> 0.6.0) jekyll-feed (~> 0.12) + jekyll-sitemap minima (~> 2.5) tzinfo (>= 1, < 3) tzinfo-data diff --git a/_config.yml b/_config.yml index ca0f0c0..6d94d26 100644 --- a/_config.yml +++ b/_config.yml @@ -1,3 +1,5 @@ theme: minima title: homepage description: another guy with a blog +plugins: + - jekyll-sitemap diff --git a/sitemap.xml b/sitemap.xml deleted file mode 100644 index cc721f5..0000000 --- a/sitemap.xml +++ /dev/null @@ -1,28 +0,0 @@ ---- -layout: null ---- - - - {% for post in site.posts %} - - {{ site.url }}{{ site.baseurl }}{{ post.url }} - {% if post.lastmod == null %} - {{ post.date | date_to_xmlschema }} - {% else %} - {{ post.lastmod | date_to_xmlschema }} - {% endif %} - weekly - 1.0 - - {% endfor %} - {% for page in site.pages %} - {% if page.sitemap != null and page.sitemap != empty %} - - {{ site.url }}{{ site.baseurl }}{{ page.url }} - {{ page.sitemap.lastmod | date_to_xmlschema }} - {{ page.sitemap.changefreq }} - {{ page.sitemap.priority }} - - {% endif %} - {% endfor %} -