Skip to content

Commit 5b2cd0f

Browse files
committed
Implement feed validator recommendations
1 parent 3390a09 commit 5b2cd0f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/routes/posts/rss.xml/+server.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export const GET: RequestHandler = async ({ fetch }) => {
99
const posts = (await response.json()) as ResolvedPost[];
1010

1111
const xml = `<?xml version="1.0" encoding="UTF-8"?>
12-
<rss version="2.0">
12+
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
1313
<channel>
1414
<title>Thilo Maier (posts)</title>
1515
<description>RSS feed for Thilo Maier's posts.</description>
@@ -24,11 +24,11 @@ export const GET: RequestHandler = async ({ fetch }) => {
2424
<description>${post.description}</description>
2525
<link>${PUBLIC_URL_ORIGIN}${post.path}</link>
2626
<pubDate>${new Date(post.publishedDate).toUTCString()}</pubDate>
27-
<guid isPermalink="true">${PUBLIC_URL_ORIGIN}${post.path}</guid>
2827
</item>
2928
`
3029
)
3130
.join('')}
31+
<atom:link href="${PUBLIC_URL_ORIGIN}/posts/rss.xml" rel="self" type="application/rss+xml" />
3232
</channel>
3333
</rss>`;
3434

0 commit comments

Comments
 (0)