File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change 9191 < meta name ="twitter:description " content ="{{ c_page_summary }} ">
9292 < meta name ="twitter:image " content ="{{ c_page_image | safe }} ">
9393
94- {% if section and section.generate_feeds %}
95- < link rel ="alternate " type ="application/rss+xml " title ="RSS " href ="{{ current_path | safe }}atom.xml ">
94+ {%- set c_is_section_with_feed = (section and section.generate_feeds) -%}
95+
96+ {% if page %}
97+ {%- set c_parent_section = get_section(path=page.ancestors | last, metadata_only=true) -%}
98+ {%- set c_is_page_in_feed = c_parent_section | get(key="generate_feeds") -%}
99+ {% else %}
100+ {%- set c_is_page_in_feed = false -%}
101+ {% endif %}
102+
103+ {% if c_is_section_with_feed or c_is_page_in_feed %}
104+ {% if c_is_section_with_feed %}
105+ {%- set c_feed_path = section.path -%}
106+ {% else %}
107+ {%- set c_feed_path = c_parent_section.path -%}
108+ {% endif %}
109+ < link rel ="alternate " type ="application/rss+xml " title ="RSS " href ="{{ c_feed_path | safe }}atom.xml ">
96110 {% endif %}
97111 </ head >
98112 < body class ="body-background dark:body-background flex flex-col h-screen justify-between ">
You can’t perform that action at this time.
0 commit comments