Улучшил соответствие стандарту RSS
См. https://validator.w3.org/feed/check.cgi?url=https%3A%2F%2Fteasanctuary.ru%2Fblog%2Frss.xml
This commit is contained in:
parent
0a476a9fca
commit
5bc2d586cc
1 changed files with 3 additions and 2 deletions
|
|
@ -48,12 +48,13 @@ export async function GET({ setHeaders }) {
|
||||||
});
|
});
|
||||||
const posts = await fetchPostsSorted();
|
const posts = await fetchPostsSorted();
|
||||||
return new Response(String(`<?xml version="1.0" encoding="UTF-8" ?>
|
return new Response(String(`<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<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">
|
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||||
<channel>
|
<channel>
|
||||||
<title>Блог Tea Sanctuary</title>
|
<title>Блог Tea Sanctuary</title>
|
||||||
|
<description>Лента с новостями, заметками и событиями Tea Sanctuary</description>
|
||||||
<link>https://teasanctuary.ru/blog</link>
|
<link>https://teasanctuary.ru/blog</link>
|
||||||
|
<atom:link href="https://teasanctuary.ru/blog/rss.xml" rel="self" type="application/rss+xml" />
|
||||||
<ttl>1800</ttl>
|
<ttl>1800</ttl>
|
||||||
<updated>${feedUpdated.toUTCString()}</updated>
|
|
||||||
${posts.map((post) => `<item>
|
${posts.map((post) => `<item>
|
||||||
<title>${escapeXml(post.title)}</title>
|
<title>${escapeXml(post.title)}</title>
|
||||||
<description><![CDATA[${escapeXml(post.description)}${makeThumbnail(post)}]]></description>${makeAuthors(post)}
|
<description><![CDATA[${escapeXml(post.description)}${makeThumbnail(post)}]]></description>${makeAuthors(post)}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue