You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use case: I want to generate an RSS feed with the full content of my posts embedded in the RSS XML file. Here is my superhtml template:
<rssversion="2.0"xmlns:atom="http://www.w3.org/2005/Atom"xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
<title>Home on mfashby.net</title>
<link>https://mfashby.net/</link>
<description>Recent content in Home on mfashby.net</description>
<language>en-gb</language>
<lastBuildDate>Sun, 03 Mar 2024 19:31:27 +0000</lastBuildDate>
<atom:linkhref="https://mfashby.net/index.xml"rel="self"type="application/rss+xml"/>
<item :loop="$page.subpages()">
<title :text="$loop.it.title"></title>
<link :text="$loop.it.link()"></link>
<pubDate :text="$loop.it.date.formatHTTP()"></pubDate>
<guidisPermaLink="true" :text="$loop.it.link()"></guid>
<description :text="$loop.it.description"></description>
<content:encoded :html="$loop.it.content()"></content:encoded>
</item>
</channel>
</rss>
however, valid HTML is not necessarily valid XML; so in order for the rendered RSS file to remain valid XML it might be necessary to escape the content HTML. The easiest way to achieve this might be to render the element content into a CDATA section. See https://www.rssboard.org/rss-profile#namespace-elements-content-encoded, but I did not find a way to do this in Zine/SuperHTML.
The text was updated successfully, but these errors were encountered:
Related a bit to #101
Use case: I want to generate an RSS feed with the full content of my posts embedded in the RSS XML file. Here is my superhtml template:
however, valid HTML is not necessarily valid XML; so in order for the rendered RSS file to remain valid XML it might be necessary to escape the content HTML. The easiest way to achieve this might be to render the element content into a CDATA section. See https://www.rssboard.org/rss-profile#namespace-elements-content-encoded, but I did not find a way to do this in Zine/SuperHTML.
The text was updated successfully, but these errors were encountered: