mirror of
https://github.com/ParkerTenBroeck/ParkerTenBroeck.github.io.git
synced 2026-06-06 21:14:06 -04:00
improving feeds
This commit is contained in:
parent
72c2bd4b59
commit
6950c0772c
3 changed files with 22 additions and 10 deletions
10
templates/macros/feed.html
Normal file
10
templates/macros/feed.html
Normal 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=""") | safe }}">
|
||||
{%- endmacro -%}
|
||||
Loading…
Add table
Add a link
Reference in a new issue