website: add feeds filter (#3098)

This commit is contained in:
M. Sarmad Qadeer 2023-09-22 13:39:18 +05:00 committed by GitHub
parent 5ca2ab6138
commit 20f90ee865
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View File

@ -23,6 +23,7 @@ metadata:
<email>{{ metadata.author.email }}</email>
</author>
{%- for blog in collections.blogs | reverse %}
{%- if not blog.data.draft %}
{%- set absolutePostUrl = blog.url | absoluteUrl(metadata.url) %}
<entry>
<title>{{ blog.data.title }}</title>
@ -33,5 +34,6 @@ metadata:
<content xml:lang="{{ metadata.language }}" type="html">{{ blog.templateContent | htmlToAbsoluteUrls(absolutePostUrl) }}</content>
{# <content xml:lang="{{ metadata.language }}" type="html">{{ blog.templateContent | striptags | truncate(200) }}</content> #}
</entry>
{%- endif %}
{%- endfor %}
</feed>

View File

@ -19,6 +19,7 @@ metadata:
<description>{{ metadata.subtitle }}</description>
<language>{{ metadata.language }}</language>
{%- for blog in collections.blogs %}
{%- if not blog.data.draft %}
{%- set absolutePostUrl = blog.url | absoluteUrl(metadata.url) %}
<item>
<title>{{ blog.data.title }}</title>
@ -30,6 +31,7 @@ metadata:
<dc:creator>{{ metadata.author.name }}</dc:creator>
<guid>{{ absolutePostUrl }}</guid>
</item>
{%- endif %}
{%- endfor %}
</channel>
</rss>