-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrssXML.js
40 lines (38 loc) · 880 Bytes
/
rssXML.js
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
var xml = `\
<?xml version="1.0" encoding="utf-8" ?>\
<rss version="2.0">\
<channel>\
<title>{rssTitle}</title>\
<image>\
<title>{imgTitle}</title>\
<link>{imgUrl}</link>\
<url>{homeUrl}</url>\
</image>\
<description>{desc}</description>\
<link>{homeUrl}</link>\
<language>zh-cn</language>\
<generator>SHUDERY</generator>\
<ttl>5</ttl>\
<copyright>MIT</copyright>\
<pubDate>{pubDate}</pubDate>\
<category />\
{items}\
</channel>\
</rss>\
`;
var item = `\
<item>\
<title>{itemTitle}</title>\
<link>{itemUrl}</link>\
<author>{author}</author>\
<guid>{guid}</guid>\
<!-- <category>{category}</category>\ -->
<pubDate>{itemDate}</pubDate>\
<comments />\
<description>{itemDesc}</description>\
</item>\
`;
module.exports = {
item,
xml,
}