Add sitemap and robots.txt

This commit is contained in:
HackerNCoder 2024-01-31 21:16:35 +01:00
parent 4028fda5b0
commit 1886970363
4 changed files with 15 additions and 0 deletions

4
assets/robots.txt Normal file
View file

@ -0,0 +1,4 @@
User-agent: *
Disallow: /lib/
Sitemap: https://comlib.encryptionin.space/sitemap.xml

View file

@ -1,2 +1,3 @@
[project] [project]
name = comlib name = comlib
url = https://comlib.encryptionin.space/

View file

@ -0,0 +1,3 @@
_template: sitemap.xml
---
_model: none

7
templates/sitemap.xml Normal file
View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
{%- for page in [site.root] if page != this recursive %}
<url><loc>{{ page|url(external=true) }}</loc></url>
{{- loop(page.children|sort(attribute='path')) }}
{%- endfor %}
</urlset>