Skip to content

Commit

Permalink
manual sitemap
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinpapst committed May 10, 2024
1 parent fd03413 commit df49842
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 5 deletions.
1 change: 0 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
source "https://rubygems.org"

gem "jekyll"
gem "jekyll-sitemap"
gem "jekyll-mentions"
gem "jekyll-paginate"
gem "webrick", "~> 1.7"
3 changes: 0 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ GEM
jekyll-paginate (1.1.0)
jekyll-sass-converter (3.0.0)
sass-embedded (~> 1.54)
jekyll-sitemap (1.4.0)
jekyll (>= 3.7, < 5.0)
jekyll-watch (2.2.1)
listen (~> 3.0)
kramdown (2.4.0)
Expand Down Expand Up @@ -93,7 +91,6 @@ DEPENDENCIES
jekyll
jekyll-mentions
jekyll-paginate
jekyll-sitemap
webrick (~> 1.7)

BUNDLED WITH
Expand Down
1 change: 0 additions & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,6 @@ kramdown:

# see Gemfile
plugins:
- jekyll-sitemap
- jekyll-mentions
- jekyll-paginate

Expand Down
20 changes: 20 additions & 0 deletions sitemap.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
layout: none
sitemap: false
permalink: /sitemap.xml
---
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
{% for collection in site.collections %}
{% for item in site[collection.label] %}
{% if item.sitemap == nil or item.sitemap %}
{%- unless site.custom_domain[item.lang] -%}
<url>
<loc>{% include link-language-domain.html language=item.lang url=item.url %}</loc>
<lastmod>{{ item.date | date_to_xmlschema }}</lastmod>
</url>
{% endunless %}
{% endif %}
{% endfor %}
{% endfor %}
</urlset>

0 comments on commit df49842

Please sign in to comment.