Browse Source

Sitemap und Feed aufgeräumt, Seiten und Posts wie gedacht exkludiert

master
Christian Aust 1 month ago
parent
commit
52310bb082
  1. 5
      404.md
  2. 42
      atom.xml
  3. 5
      index.html
  4. 12
      sitemap.xml

5
404.md

@ -2,7 +2,10 @@
layout: default
title: "404: Page not found"
permalink: 404.html
sitemap: false
---
# 404: Page not found
Sorry, we've misplaced that URL or it's pointing to something that doesn't exist. [Head back home]({{ site.url }}) to try finding it again.
Sorry, we've misplaced that URL or it's pointing to something that doesn't exist. [Head back home]({{ site.url }}) to try finding it again.

42
atom.xml

@ -1,28 +1,30 @@
---
layout: null
layout: compress
sitemap: false
---
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>{{ site.title }}</title>
<link href="{{ '/atom.xml' | absolute_url }}" rel="self" />
<link href="{{ site.url }}" />
<updated>{{ site.time | date_to_xmlschema }}</updated>
<id>{{ site.url }}</id>
<author>
<name>{{ site.author.name }}</name>
<email>{{ site.author.email }}</email>
</author>
<title>{{ site.title }}</title>
<link href="{{ site.url }}{{ site.baseurl }}/atom.xml" rel="self"/>
<link href="{{ site.url }}{{ site.baseurl }}/"/>
<updated>{{ site.time | date_to_xmlschema }}</updated>
<id>{{ site.url }}</id>
<author>
<name>{{ site.author.name }}</name>
<email>{{ site.author.email }}</email>
</author>
{% for post in site.posts %}
<entry>
<title>{{ post.title }}</title>
<link href="{{ site.url }}{{ post.url }}"/>
<updated>{{ post.date | date_to_xmlschema }}</updated>
<id>{{ site.url }}{{ site.baseurl }}{{ post.id }}</id>
<content type="html">{{ post.content | xml_escape }}</content>
</entry>
{% endfor %}
{% for post in site.posts %}
{% unless post.published == false %}
<entry>
<title>{{ post.title }}</title>
<link href="{{ post.url | absolute_url }}"/>
<updated>{{ post.date | date_to_xmlschema }}</updated>
<id>{{ site.url }}{{ site.baseurl }}{{ post.id }}</id>
<content type="html">{{ post.content | xml_escape }}</content>
</entry>
{% endunless %}
{% endfor %}
</feed>

5
index.html

@ -1,6 +1,9 @@
---
layout: default
title: Start
sitemap:
priority: 1.0
changefreq: weekly
---
<div class="posts">
@ -27,7 +30,7 @@ title: Start
{% endif %}
{% if paginator.previous_page %}
{% if paginator.page == 2 %}
<a class="pagination-item newer" href="{{ '/' }}">Newer</a>
<a class="pagination-item newer" href="{{ '/' }}">Neuere</a>
{% else %}
<a class="pagination-item newer" href="{{ paginator.previous_page_path }}">Neuere</a>
{% endif %}

12
sitemap.xml

@ -1,14 +1,15 @@
---
layout: compress
sitemap:
exclude: 'yes'
sitemap: false
---
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<!-- Posts -->
{% for post in site.posts %}
{% unless post.published == false %}
<url>
<loc>{{ site.url }}{{ post.url }}</loc>
<loc>{{ post.url | absolute_url }}</loc>
{% if post.sitemap.lastmod %}
<lastmod>{{ post.sitemap.lastmod | date: "%Y-%m-%d" }}</lastmod>
{% elsif post.date %}
@ -29,10 +30,11 @@ sitemap:
</url>
{% endunless %}
{% endfor %}
<!-- Pages -->
{% for page in site.pages %}
{% unless page.sitemap.exclude == "yes" or page.name == "atom.xml" %}
{% unless page.sitemap == false or page.name == "atom.xml"%}
<url>
<loc>{{ site.url }}{{ page.url | remove: "index.html" }}</loc>
<loc>{{ page.url | absolute_url }}</loc>
{% if page.sitemap.lastmod %}
<lastmod>{{ page.sitemap.lastmod | date: "%Y-%m-%d" }}</lastmod>
{% elsif page.date %}

Loading…
Cancel
Save