add gemini feed

This commit is contained in:
Simon Vieille 2021-04-12 22:11:19 +02:00
parent fdf7df9f21
commit f41d45b48d
2 changed files with 5 additions and 1 deletions

View File

@ -174,6 +174,7 @@ class PostController extends PageController
'post' => $entity->getId(),
'slug' => $entity->getSlug(),
], UrlGeneratorInterface::ABSOLUTE_URL),
'linkGemini' => sprintf('gemini://deblan.io/posts/%d.gmi', $entity->getId()),
];
}

View File

@ -9,7 +9,10 @@
{% for item in items %}
<item>
<title><![CDATA[{{ item.title|raw }}]]></title>
<link>{{ item.link }}</link>
<link href="{{ item.link }}" type="text/html" />
{% if item.link_gemini is defined %}
<link href="{{ item.linkGemini }}" type="text/gemini" />
{% endif %}
<description><![CDATA[{{ item.description|raw }}]]></description>
<guid isPermaLink="false">{{ item.guid }}</guid>
<pubDate>{{ item.date|date('r') }}</pubDate>