improving feeds

This commit is contained in:
Parker TenBroeck 2026-01-16 22:29:36 -05:00
parent 72c2bd4b59
commit 6950c0772c
3 changed files with 22 additions and 10 deletions

View file

@ -0,0 +1,10 @@
{%- macro link_alternate(filename, title) -%}
{%- if filename is ending_with("atom.xml") -%}
{%- set type = 'type="application/atom+xml" ' -%}
{%- elif filename is ending_with("rss.xml") -%}
{%- set type = 'type="application/rss+xml" ' -%}
{%- elif filename is ending_with(".json") -%}
{%- set type = 'type="application/feed+json" ' -%}
{%- endif -%}
<link rel="alternate" {{ type | default(value="") | safe -}} href="{{ get_url(path=filename) }}" title="{{ title | replace(from='"', to="&quot;") | safe }}">
{%- endmacro -%}