Skip to content

Instantly share code, notes, and snippets.

@iChris
Created August 15, 2023 16:12
Show Gist options
  • Save iChris/5fbadb85cec73285eb80cada39f900e7 to your computer and use it in GitHub Desktop.
Save iChris/5fbadb85cec73285eb80cada39f900e7 to your computer and use it in GitHub Desktop.
WP.njk file contents
---
permalink: 'wp.xml'
---
<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0"
xmlns:excerpt="http://wordpress.org/export/1.2/excerpt/"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:wp="http://wordpress.org/export/1.2/"
>
<channel>
<title>Faraway, So Close</title>
<link>https://chrisenns.com</link>
<description>Faraway, So Close is the blog of Chris Enns.</description>
<pubDate>Sun, 13 Aug 2023 10:27:40 +0000</pubDate>
<language>en-GB</language>
<wp:wxr_version>1.2</wp:wxr_version>
<wp:base_site_url>https://chrisenns.com</wp:base_site_url>
<wp:base_blog_url>https://chrisenns.com</wp:base_blog_url>
<wp:category>
<wp:term_id>1</wp:term_id>
<wp:category_nicename><![CDATA[uncategorized]]></wp:category_nicename>
<wp:category_parent><![CDATA[]]></wp:category_parent>
<wp:cat_name><![CDATA[Uncategorized]]></wp:cat_name>
</wp:category>
<wp:term>
<wp:term_id>1</wp:term_id>
<wp:term_taxonomy><![CDATA[category]]></wp:term_taxonomy>
<wp:term_slug><![CDATA[uncategorized]]></wp:term_slug>
<wp:term_parent><![CDATA[]]></wp:term_parent>
<wp:term_name><![CDATA[Uncategorized]]></wp:term_name>
</wp:term>
<generator>https://wordpress.org/?v=5.8.1</generator>
{% for item in collections.posts %}
<item>
<title><![CDATA[{{ item.date }}]]></title>
<link>https://chrisenns.com/{{ item.fileSlug }}/</link>
<pubDate>{{ item.data.title }}</pubDate>
<dc:creator><![CDATA[test]]></dc:creator>
<description></description>
<content:encoded><![CDATA[{{ item.templateContent | safe }}]]></content:encoded>
<excerpt:encoded><![CDATA[]]></excerpt:encoded>
<wp:post_id>{{ loop.index + 5 }}</wp:post_id>
<wp:post_date><![CDATA[{{ item.data.title | w3DateFilter }}]]></wp:post_date>
<wp:comment_status><![CDATA[closed]]></wp:comment_status>
<wp:ping_status><![CDATA[closed]]></wp:ping_status>
<wp:post_name><![CDATA[{{ item.fileSlug }}d]]></wp:post_name>
<wp:status><![CDATA[publish]]></wp:status>
<wp:post_parent>0</wp:post_parent>
<wp:menu_order>0</wp:menu_order>
<wp:post_type><![CDATA[post]]></wp:post_type>
<wp:post_password><![CDATA[]]></wp:post_password>
<wp:is_sticky>0</wp:is_sticky>
<category domain="category" nicename="uncategorized"><![CDATA[Uncategorized]]></category>
</item>
{% endfor %}
</channel>
</rss>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment