Skip to content

Commit

Permalink
Käsitsi tehtud sitemap (kollektsioonid ei arvesta keelega)
Browse files Browse the repository at this point in the history
  • Loading branch information
boamaod committed Feb 23, 2024
1 parent 9944baa commit 80bc2cf
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 5 deletions.
5 changes: 0 additions & 5 deletions index_en_sitemap_hack.md

This file was deleted.

26 changes: 26 additions & 0 deletions sitemap.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
layout:
---
<?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 lang in site.languages -%}
{%- for node in site.pages -%}
{%- unless site.exclude_from_localization contains node.path -%}
{% if node.layout %}
<url>
<loc>{%- if lang == site.default_lang -%}{{ node.url | absolute_url }}{%- else -%}{{ node.url | prepend: lang | prepend: '/' | absolute_url }}{%- endif -%}</loc>
<lastmod>{%- if node.last_modified_at -%}{{ node.last_modified_at | date_to_xmlschema }}{%- else -%}{{ node.date | date_to_xmlschema}}{%- endif -%}</lastmod>
</url>
{%- endif -%}
{%- endunless -%}
{%- endfor -%}
{%- endfor -%}
{%- for collection in site.collections -%}
{% for node in site[collection.label] %}
<url>
<loc>{%- if lang == site.default_lang -%}{{ node.url | absolute_url }}{%- else -%}{{ node.url | prepend: lang | prepend: '/' | absolute_url }}{%- endif -%}</loc>
<lastmod>{%- if node.last_modified_at -%}{{ node.last_modified_at | date_to_xmlschema }}{%- else -%}{{ node.date | date_to_xmlschema}}{%- endif -%}</lastmod>
</url>
{%- endfor -%}
{% endfor %}
</urlset>

0 comments on commit 80bc2cf

Please sign in to comment.