Skip to content

Commit 083e298

Browse files
committed
Update sitemap.xml
1 parent eb3ca4c commit 083e298

File tree

1 file changed

+10
-20
lines changed

1 file changed

+10
-20
lines changed

sitemap.xml

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -7,36 +7,26 @@ sitemap: false
77
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd"
88
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
99

10-
{% comment %} Loop through standard pages generated by Jekyll {% endcomment %}
10+
{% comment %} Loop through all pages generated by Jekyll, including those from plugins {% endcomment %}
1111
{% for page in site.html_pages %}
12-
{% comment %} Exclude files you don't want in the sitemap and repository pages (we'll add those separately) {% endcomment %}
13-
{% if page.url != '/repo-pages/' and page.sitemap != false and page.url contains '/repo/' == false %}
12+
{% comment %} Exclude files you don't want in the sitemap {% endcomment %}
13+
{% if page.url != '/repo-pages/' and page.sitemap != false %}
1414
<url>
1515
<loc>{{ site.url }}{{ page.url | remove: 'index.html' }}</loc>
1616
{% if page.last_modified_at %}
1717
<lastmod>{{ page.last_modified_at | date_to_xmlschema }}</lastmod>
1818
{% else %}
1919
<lastmod>{{ site.time | date_to_xmlschema }}</lastmod>
2020
{% endif %}
21-
<changefreq>weekly</changefreq>
22-
<priority>0.8</priority>
21+
{% if page.url contains '/repo/' %}
22+
<changefreq>monthly</changefreq>
23+
<priority>0.6</priority>
24+
{% else %}
25+
<changefreq>weekly</changefreq>
26+
<priority>0.8</priority>
27+
{% endif %}
2328
</url>
2429
{% endif %}
2530
{% endfor %}
2631

27-
{% comment %} Loop through repository pages generated by our plugin {% endcomment %}
28-
{% for repository in site.data.repositories %}
29-
{% assign repo_path = repository.repo | split: '/' %}
30-
{% assign owner = repo_path[0] %}
31-
{% assign repo = repo_path[1] %}
32-
{% assign branch = repository.branch | default: 'main' %}
33-
{% assign repo_url = site.url | append: '/repo/' | append: repository.repo | append: '/' | append: branch | append: '/' %}
34-
<url>
35-
<loc>{{ repo_url }}</loc>
36-
<lastmod>{{ site.time | date_to_xmlschema }}</lastmod>
37-
<changefreq>monthly</changefreq>
38-
<priority>0.6</priority>
39-
</url>
40-
{% endfor %}
41-
4232
</urlset>

0 commit comments

Comments
 (0)