Add sitemap.xml

This commit is contained in:
Jonny Gerig Meyer 2023-04-06 14:46:54 -04:00
parent e904070e5d
commit 20aa8ef3a3
No known key found for this signature in database
7 changed files with 34 additions and 8 deletions

View File

@ -1,7 +1,8 @@
---
layout: has_no_sidebars
title: Page Not Found
permalink: 404.html
permalink: '/404.html'
eleventyExcludeFromCollections: true
introduction: >
Sorry, but the page you were trying to view does not exist.
center_introduction: true

View File

@ -1,4 +1,5 @@
/feed /feed.xml 200
/sitemap /sitemap.xml 200
/tutorial /guide
/download /install
/try https://www.sassmeister.com

View File

@ -1,5 +1,5 @@
---
permalink: 'feed.xml'
permalink: '/feed.xml'
eleventyExcludeFromCollections: true
---
<?xml version="1.0" encoding="utf-8"?>

View File

@ -1,5 +1,6 @@
---
permalink: humans.txt
permalink: '/humans.txt'
eleventyExcludeFromCollections: true
---
# humanstxt.org/
# The humans responsible & technology colophon

10
source/robots.liquid Normal file
View File

@ -0,0 +1,10 @@
---
permalink: '/robots.txt'
eleventyExcludeFromCollections: true
---
# www.robotstxt.org/
# Allow crawling of all content
User-agent: *
Disallow:
Sitemap: {{ '/sitemap.xml' | absoluteUrl: site.url }}

View File

@ -1,5 +0,0 @@
# www.robotstxt.org/
# Allow crawling of all content
User-agent: *
Disallow:

18
source/sitemap.liquid Normal file
View File

@ -0,0 +1,18 @@
---
permalink: '/sitemap.xml'
eleventyExcludeFromCollections: true
---
<?xml version="1.0" encoding="utf-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
{%- assign pages = collections.all | reverse -%}
{%- for page in pages -%}
{%- if not page.data.draft %}
<url>
<loc>{{ page.url | absoluteUrl: site.url }}</loc>
<lastmod>{{ page.date | dateToRfc3339 }}</lastmod>
<changefreq>{{ page.data.changefreq | default: 'monthly' }}</changefreq>
<priority>{{ page.data.priority | default: '0.5' }}</priority>
</url>
{%- endif -%}
{%- endfor %}
</urlset>