aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/vendor/rss/rss.example.md
blob: 4e532fd71f309f06757d4b908bfad52908a1adb1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
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>
```