Skip to content

Commit

Permalink
fix RSS
Browse files Browse the repository at this point in the history
  • Loading branch information
saadeghi committed Sep 28, 2023
1 parent 3e67efb commit 621b71d
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/docs/src/routes/blog/rss.xml/+server.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,15 @@ export const GET = async () => {
})
}

const render = (
postsInfo
) => `<rss xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:atom="https://www.w3.org/2005/Atom" version="2.0">
const render = (postsInfo) => `<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
>
<channel>
<title>
<![CDATA[ ${siteTitle} ]]>
Expand All @@ -56,7 +62,7 @@ const render = (
<![CDATA[ ${siteDesc} ]]>
</description>
<link>${siteUrl}/</link>
<lastBuildDate>${new Date()}</lastBuildDate>
<lastBuildDate>${new Date().toUTCString()}</lastBuildDate>
<atom:link href="${siteUrl}/rss.xml" rel="self" type="application/rss+xml"/>
${postsInfo
.map(
Expand Down

0 comments on commit 621b71d

Please sign in to comment.