Skip to content

Commit

Permalink
feat: loop config.feed_filenames
Browse files Browse the repository at this point in the history
  • Loading branch information
charlesrocket committed Jul 16, 2024
1 parent 4f032d7 commit 63d79de
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion templates/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,14 @@
{%- endif %}
{%- if page.taxonomies["tags"] %}<meta name="keywords" content="{{ page.taxonomies["tags"] | as_str | replace(from=" ", to="") | replace(from="[", to="") | replace(from="]", to="") }}">{% endif %}
{%- if config.generate_feeds %}
<link rel="alternate" type="{% if config.feed_filenames is containing('atom') %}application/atom+xml{% else %}application/rss+xml{% endif %}" title="{{ config.title }} Atom/RSS Feed" href="{{ get_url(path=config.feed_filenames, trailing_slash=false, lang=lang) | safe }}">
{%- for feed in config.feed_filenames %}
{%- if feed is containing('atom') %}
<link rel="alternate" type="application/atom+xml" title="{{ config.title }} Atom Feed" href="{{ get_url(path=feed, trailing_slash=false, lang=lang) | safe }}" />
{%- endif %}
{%- if feed is containing('rss') %}
<link rel="alternate" type="application/rss+xml" title="{{ config.title }} RSS Feed" href="{{ get_url(path=feed, trailing_slash=false, lang=lang) | safe }}" />
{%- endif %}
{%- endfor %}
{%- endif %}
<meta property="og:locale" content="{{ config.extra.locale }}">
<meta property="og:type" content="article">
Expand Down

0 comments on commit 63d79de

Please sign in to comment.