Created
January 28, 2025 23:18
-
-
Save Nooshu/da04fd0322e45936fbbc5c663ebc9677 to your computer and use it in GitHub Desktop.
The Nunjucks template I use to output my plaintext RSS feed in 11ty 3.0.0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
permalink: feed/feed.txt | |
eleventyComputed: | |
layout: null | |
--- | |
# {{ metadata.title }} - {{ metadata.author.name }} - {{ metadata.description }} | |
## {{ metadata.fulldescription }} | |
URL: {{ metadata.url }} | |
{% for post in collections.posts | reverse -%} | |
{% if loop.index0 < 10 -%} | |
--- Start: {{ post.data.title | safe }} | |
Published on: {{ post.date | readableDate }} | |
{{ metadata.url }}{{ post.url }} | |
Main Content: | |
{{ post.templateContent | striptags(true) | decodeHtmlEntities | safe }} | |
{% if not loop.last %} | |
--- End: {{ post.data.title | safe }} | |
{% endif -%} | |
{% endif -%} | |
{% endfor -%} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment