Commit 97446e9 1 parent 8780e3a commit 97446e9 Copy full SHA for 97446e9
File tree 2 files changed +58
-0
lines changed
2 files changed +58
-0
lines changed Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2
+ <xsl : stylesheet version =" 1.0" xmlns : xsl =" http://www.w3.org/1999/XSL/Transform" >
3
+ <xsl : output method =" html" version =" 1.0" encoding =" UTF-8" indent =" yes" />
4
+ <xsl : template match =" /" >
5
+ <html >
6
+ <head >
7
+ <title >RSS Feed</title >
8
+ <style >
9
+ body {
10
+ font-family: Arial, sans-serif;
11
+ line-height: 1.6;
12
+ margin: 0;
13
+ padding: 0;
14
+ background-color: #f4f4f4;
15
+ }
16
+ .container {
17
+ width: 80%;
18
+ margin: auto;
19
+ overflow: hidden;
20
+ }
21
+ ul {
22
+ list-style: none;
23
+ padding: 0;
24
+ }
25
+ li {
26
+ background: #fff;
27
+ margin: 0.5em 0;
28
+ padding: 1em;
29
+ border-radius: 5px;
30
+ box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
31
+ }
32
+ a {
33
+ color: #00539f;
34
+ text-decoration: none;
35
+ }
36
+ a:hover {
37
+ text-decoration: underline;
38
+ }
39
+ </style >
40
+ </head >
41
+ <body >
42
+ <div class =" container" >
43
+ <h1 >RSS Feed</h1 >
44
+ <ul >
45
+ <xsl : for-each select =" rss/channel/item" >
46
+ <li >
47
+ <h2 ><a href =" {link}" ><xsl : value-of select =" title" /></a ></h2 >
48
+ <p ><xsl : value-of select =" description" /></p >
49
+ <small ><xsl : value-of select =" pubDate" /></small >
50
+ </li >
51
+ </xsl : for-each >
52
+ </ul >
53
+ </div >
54
+ </body >
55
+ </html >
56
+ </xsl : template >
57
+ </xsl : stylesheet >
Original file line number Diff line number Diff line change @@ -14,5 +14,6 @@ export async function GET(context) {
14
14
link : `/posts/${ post . data . slug } /` ,
15
15
} ) ) ,
16
16
customData : `<language>en-us</language>` ,
17
+ stylesheet : '/rss/styles.xsl' ,
17
18
} ) ;
18
19
}
You can’t perform that action at this time.
0 commit comments