feat: add RSS and Atom feeds with caching and nice links

This commit is contained in:
David Bailey 2023-12-25 20:13:00 +01:00
parent c6297fd81b
commit 596cc0e1a3
7 changed files with 120 additions and 1 deletions

View file

@ -26,5 +26,11 @@
<a href="/raw{{post.post_path}}">raw</a>
<a href="/api/posts{{post.post_path}}">api</a>
</li>
<li>
<a rel="alternate" type="application/rss+xml" target="_blank"
style="padding-left: 0.3rem;" href="/feed/rss{{post.post_path}}">
{{ fa['rss']|raw }}
</a>
</li>
</menu>
</div>

View file

@ -2,6 +2,11 @@
{% extends "root.html" %}
{% block feed_links %}
<link rel="alternate" type="application/rss+xml" title="DergSite Global Feed" href="https://lucidragons.de/feed">
<link rel="alternate" type="application/atom+xml" title="DergSite Feed for {{post.post_path}}" href="https://lucidragons.de/feed/atom{{post.post_path}}">
{% endblock %}
{% block second_title %}
<h2> {{ post.post_metadata.title }} </h2>
{% endblock %}

View file

@ -7,6 +7,10 @@
<meta name="viewport" content="width=device-width,initial-scale=1">
{% block feed_links %}
<link rel="alternate" type="application/rss+xml" title="DergSite Global Feed" href="https://lucidragons.de/feed">
{% endblock %}
{% block extra_head %}{% endblock %}
<script src="/static/banner.js" defer></script>