Add custom sitemap.xml with hreflang
parent
d3ede65b75
commit
79303ac5ea
1
404.md
1
404.md
|
@ -2,6 +2,7 @@
|
|||
title: Page Not Found
|
||||
layout: article
|
||||
permalink: 404.html
|
||||
sitemap: false
|
||||
---
|
||||
|
||||
|
||||
|
|
|
@ -6,7 +6,6 @@ sass:
|
|||
|
||||
plugins:
|
||||
- jekyll-redirect-from
|
||||
- jekyll-sitemap
|
||||
|
||||
exclude:
|
||||
- locale
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
---
|
||||
title: Thanks for the feedback
|
||||
layout: article
|
||||
sitemap: false
|
||||
---
|
||||
|
||||
# Thanks for the feedback
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
---
|
||||
---
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
|
||||
xmlns:xhtml="http://www.w3.org/1999/xhtml">
|
||||
|
||||
{% for page in site.pages %}
|
||||
{% assign pathsplit = page.path | split: '/' %}
|
||||
{% assign lang = pathsplit[0] %}
|
||||
{% unless page.sitemap == false or page.layout == null %}
|
||||
<url>
|
||||
<loc>{{ page.url | absolute_url }}</loc>
|
||||
|
||||
{% if site.data.locale[lang] %}
|
||||
{% assign oldSegment = "/" | append: lang | append: "/" %}
|
||||
{% for other in site.data.languages %}
|
||||
{% assign newSegment = "/" | append: other.code | append: "/" %}
|
||||
<xhtml:link
|
||||
rel="alternate"
|
||||
hreflang="{{ other.code }}"
|
||||
href="{{ page.url | replace: oldSegment, newSegment | absolute_url }}"/>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
</url>
|
||||
{% endunless %}
|
||||
{% endfor %}
|
||||
|
||||
</urlset>
|
|
@ -1,5 +1,6 @@
|
|||
---
|
||||
title: Uninstall Feedback
|
||||
sitemap: false
|
||||
layout: article
|
||||
reasons:
|
||||
missing_features:
|
||||
|
|
Loading…
Reference in New Issue