Skip to content

Commit

Permalink
fix: alternates feed link
Browse files Browse the repository at this point in the history
  • Loading branch information
ArnaudLigny committed Aug 10, 2023
1 parent 7933b7a commit cf257a6
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions resources/layouts/partials/feeds-from-section.html.twig
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{%- set feed_formats = ['atom', 'rss', 'jsonfeed'] -%}
{%- if page.section|default and page.type == 'page' -%}
{%- set section = site.pages.showable[page.section]|default -%}
{%- if section -%}
{%- include 'partials/alternates.html.twig' with {'title': title, 'page': section, 'alternates': section.alternates|filter(a => a.format in ['atom', 'rss', 'jsonfeed'])} only ~%}
{%- set section_page = site.pages[page.section]|default -%}
{%- if section_page -%}
{%- include 'partials/alternates.html.twig' with {'title': title, 'page': section_page, 'alternates': section_page.alternates|filter(a => a.format in feed_formats)} only ~%}
{%- endif -%}
{%- endif -%}

0 comments on commit cf257a6

Please sign in to comment.