Skip to content

Commit e8713ff

Browse files
committed
List all sitemap.xml entries with an absolute URL.
See [Google's best practices](https://developers.google.com/search/docs/crawling-indexing/sitemaps/build-sitemap#general-guidelines).
1 parent 3a3b978 commit e8713ff

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sitemap.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ sitemap_exclude: y
77
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
88
{% for post in site.posts %}
99
<url>
10-
<loc>{{site.baseurl}}{{ post.url | remove: 'index.html' }}</loc>
10+
<loc>{{site.url}}{{site.baseurl}}{{ post.url | remove: 'index.html' }}</loc>
1111
</url>
1212
{% endfor %}
1313

1414
{% for page in site.pages %}
1515
{% if page.sitemap_exclude != 'y' %}
1616
<url>
17-
<loc>{{site.baseurl}}{{ page.url | remove: 'index.html' }}</loc>
17+
<loc>{{site.url}}{{site.baseurl}}{{ page.url | remove: 'index.html' }}</loc>
1818
</url>
1919
{% endif %}
2020
{% endfor %}

0 commit comments

Comments
 (0)