sitemap.xml.twig 864 B

1234567891011121314151617181920212223
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <?xml-stylesheet type="text/xsl" href="{{ uri.rootUrl }}/user/plugins/sitemap/sitemap.xsl"?>
  3. <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml">
  4. {% for entry in sitemap %}
  5. <url>
  6. <loc>{{ entry.location|e }}</loc>
  7. {% if entry.translated %}
  8. {% for language, page_route in entry.translated %}
  9. <xhtml:link rel="alternate" hreflang="{{ language }}" href="{{uri.rootUrl(true)}}{{grav.language.getLanguageURLPrefix(language)}}{{ page_route }}" />
  10. {% endfor %}
  11. {% endif %}
  12. {% if entry.lastmod %}
  13. <lastmod>{{ entry.lastmod }}</lastmod>
  14. {% endif %}
  15. {% if entry.changefreq %}
  16. <changefreq>{{ entry.changefreq }}</changefreq>
  17. {% endif %}
  18. {% if entry.priority %}
  19. <priority>{{ entry.priority|number_format(1) }}</priority>
  20. {% endif %}
  21. </url>
  22. {% endfor %}
  23. </urlset>