Skip to content

Commit 1267af3

Browse files
committed
Update sitemap.xml
1 parent ad73096 commit 1267af3

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

sitemap.xml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,18 @@ sitemap: false
2424
{% endif %}
2525
{% endfor %}
2626

27-
{% comment %} Loop through repository data {% endcomment %}
27+
{% comment %} Loop through repository pages (static pages generated by plugin) {% endcomment %}
2828
{% for repository in site.data.repositories %}
29-
{% assign repo_url_part = repository.repo | replace: '/', '/repo/' %}
29+
{% assign repo_path = repository.repo | split: '/' %}
30+
{% assign owner = repo_path[0] %}
31+
{% assign repo = repo_path[1] %}
3032
{% assign branch = repository.branch | default: 'main' %}
31-
{% assign full_repo_url = site.url | append: '/repo/' | append: repository.repo | append: '/' | append: branch | append: '/' %}
33+
{% assign repo_url = site.url | append: '/repo/' | append: repository.repo | append: '/' | append: branch | append: '/' %}
3234
<url>
33-
<loc>{{ full_repo_url }}</loc>
34-
<lastmod>{{ site.time | date_to_xmlschema }}</lastmod> {# Use build time as lastmod #}
35-
<changefreq>monthly</changefreq> {# Adjust as needed #}
36-
<priority>0.6</priority> {# Adjust as needed #}
35+
<loc>{{ repo_url }}</loc>
36+
<lastmod>{{ site.time | date_to_xmlschema }}</lastmod>
37+
<changefreq>monthly</changefreq>
38+
<priority>0.6</priority>
3739
</url>
3840
{% endfor %}
3941

0 commit comments

Comments
 (0)