Skip to content

Commit

Permalink
Merge pull request #148 from parlough/misc/remove-unnecessary-sitemap…
Browse files Browse the repository at this point in the history
…-index

Remove unnecessary /index from sitemap generation
  • Loading branch information
sfshaza2 committed Feb 2, 2022
2 parents 099062f + 5ac8f7e commit de7668f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sitemap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ sitemap: false

{%- unless page.sitemap == false -%}
<url>
<loc>{{ site.url | append: page.url | regex_replace: '/index\.html$|\.html$|/$' }}</loc>
<loc>{{ site.url | append: page.url | regex_replace: '/index(\.html)?$|\.html$|/$' }}</loc>
<lastmod>
{%- if page.sitemap.lastmod -%}
{{ page.sitemap.lastmod | date: "%Y-%m-%d" }}
Expand Down

0 comments on commit de7668f

Please sign in to comment.