From 8f1f8d47bbb2f8b3233c525fbafe35dc5a1b137b Mon Sep 17 00:00:00 2001 From: Ben Balter Date: Tue, 13 Dec 2016 13:58:48 -0500 Subject: [PATCH] Use Jekyll Sitemap to generate the sitemap. Jekyll Sitemap (https://github.com/jekyll/jekyll-sitemap) is an official Jekyll plugin, which should serve as a drop-in replacement for the existing sitemap.xml. The resulting sitemap should be largely similar to the existing sitemap, but with a shared, battle-tested template that accounts for all sorts of edge cases, handles collections and static files, etc. --- _config.yml | 1 + sitemap.xml | 18 ------------------ 2 files changed, 1 insertion(+), 18 deletions(-) delete mode 100644 sitemap.xml diff --git a/_config.yml b/_config.yml index ea24a1bfc0..2c3c51a83b 100644 --- a/_config.yml +++ b/_config.yml @@ -31,3 +31,4 @@ permalink: pretty gems: - jekyll-redirect-from - jekyll-feed + - jekyll-sitemap diff --git a/sitemap.xml b/sitemap.xml deleted file mode 100644 index ff1dd0d398..0000000000 --- a/sitemap.xml +++ /dev/null @@ -1,18 +0,0 @@ ---- ---- - - - - - http://kubernetes.io/ - {{ site.time | date_to_xmlschema }} - -{% for page in site.pages %}{% if page.url != "/404.html" and page.url != "/sitemap.xml" and page.url != "/css/styles.css" %} - http://kubernetes.io{{ page.url }} - {% if page.date %}{{ page.date | date_to_xmlschema }}{% else %}{{ site.time | date_to_xmlschema }}{% endif %} -{% endif %}{% endfor %} -