Adding sitemap

This commit is contained in:
L3D 2022-01-14 02:17:28 +01:00
parent 03e049af66
commit 2b600b8ba7
Signed by: l3d
GPG key ID: CD08445BFF4313D1
3 changed files with 29 additions and 0 deletions

16
assets/scss/sitemap.scss Normal file
View file

@ -0,0 +1,16 @@
@import "_variables";
urlset {
background-color: $background_accent_2;
url {
color: $font_default;
&:after {
content: '\a';
white-space: pre;
}
&:before {
content: '> ';
white-space: pre;
}
}
}

View file

@ -0,0 +1,4 @@
_template: sitemap.xml
---
_model: none
_discoverable: no

9
templates/sitemap.xml Normal file
View file

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="{{ 'css/sitemap.min.css'|asseturl }}" type="text/css" ?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
{%- for page in [site.root] if page != this recursive %}
{%- if not page.hide_from_global_index %}
<url><loc>{{ page|url(external=true) }}</loc></url>
{{- loop(page.children) }}
{%- endif %}
{%- endfor %}
</urlset>