diff options
Diffstat (limited to 'src/lib/vendor/rss/rss.example.md')
| -rw-r--r-- | src/lib/vendor/rss/rss.example.md | 110 |
1 files changed, 110 insertions, 0 deletions
diff --git a/src/lib/vendor/rss/rss.example.md b/src/lib/vendor/rss/rss.example.md new file mode 100644 index 0000000..4e532fd --- /dev/null +++ b/src/lib/vendor/rss/rss.example.md @@ -0,0 +1,110 @@ +```ts +const doc = new XMLDocumentRoot().child( + new XMLDeclaration().version().encoding(), + new RSSRootElement() + .channel( + new RSSChannelElement( + 'Latest blog posts for 7222e800', + 'Some Description Here', + 'https://estrogen.zone/~mem/blog/' + ) + .pubDate(new Date('2026-01-14T15:53:57Z') /* When the last item was published */) + .lastBuildDate(new Date() /* When this file was last updated - usually when your build process last ran */) + .language('en') + .child(new XMLElement('nonStandardElement').attribute('non-standard', 'true')) + .items( + new RSSItemElement( + 'Some Fancy Blog Post Title', + 'Imagine some crazy fun thing here that is guaranteed to get the reader hooked. A really good blurb would be here in practice.', + 'https://estrogen.zone/~mem/blog/1234567890-your-fancy-post-slug/', + ) + .author('7222e800') + .guid('https://estrogen.zone/~mem/blog/1234567890', true) + .pubDate(new Date('2026-01-14T15:53:57Z')), + new RSSItemElement( + 'Domesticated Catgirl Transport', + 'Smuggling multiple thousands of catgirls over borders isn\'t an easy feat. Here\'s how we did it.', + 'https://estrogen.zone/~mem/blog/1234566789-catgirl-smuggling-operation/', + ) + .author('CatgirlSmuggler9000') + .author('7222e800') + .guid('https://estrogen.zone/~mem/blog/1234566789', true) + .pubDate(new Date('2026-01-14T15:53:57Z')), + ) + ) +); +const xml = doc.toString(); +``` + +will output + +```xml +<?xml version="1.0" encoding="UTF-8" ?> +<rss version="2.0" + xmlns:content="http://purl.org/rss/1.0/modules/content/"> + <channel> + <title> + Latest blog posts for 7222e800 + </title> + <description> + Some Description Here + </description> + <link> + https://estrogen.zone/~mem/blog/ + </link> + <pubDate> + Wed, 14 Jan 2026 15:53:57 GMT + </pubDate> + <lastBuildDate> + Mon, 26 Jan 2026 04:45:27 GMT + </lastBuildDate> + <language> + en + </language> + <nonStandardElement non-standard="true" /> + <item> + <title> + Some Fancy Blog Post Title + </title> + <description> + Imagine some crazy fun thing here that is guaranteed to get the reader hooked. A really good blurb would be here in practice. + </description> + <link> + https://estrogen.zone/~mem/blog/1234567890-your-fancy-post-slug/ + </link> + <author> + 7222e800 + </author> + <guid isPermaLink="true"> + https://estrogen.zone/~mem/blog/1234567890 + </guid> + <pubDate> + Wed, 14 Jan 2026 15:53:57 GMT + </pubDate> + </item> + <item> + <title> + Domesticated Catgirl Transport + </title> + <description> + Smuggling multiple thousands of catgirls over borders isn't an easy feat. Here's how we did it. + </description> + <link> + https://estrogen.zone/~mem/blog/1234566789-catgirl-smuggling-operation/ + </link> + <author> + CatgirlSmuggler9000 + </author> + <author> + 7222e800 + </author> + <guid isPermaLink="true"> + https://estrogen.zone/~mem/blog/1234566789 + </guid> + <pubDate> + Wed, 14 Jan 2026 15:32:57 GMT + </pubDate> + </item> + </channel> +</rss> +``` |