Блоги #1
2 changed files with 2 additions and 1 deletions
|
|
@ -45,7 +45,7 @@ function getIconFromUrl(url: URL): string | undefined {
|
||||||
const href = url.href;
|
const href = url.href;
|
||||||
if (href.startsWith('mailto:'))
|
if (href.startsWith('mailto:'))
|
||||||
return 'email';
|
return 'email';
|
||||||
if (href.endsWith('/rss.xml'))
|
if (href.endsWith('/rss.xml') || href.endsWith('/atom.rss'))
|
||||||
return 'rss';
|
return 'rss';
|
||||||
|
|
||||||
const hostname = url.hostname;
|
const hostname = url.hostname;
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,7 @@ export async function GET({ setHeaders }) {
|
||||||
${posts.map((post) => `<item>
|
${posts.map((post) => `<item>
|
||||||
<title>${escapeXml(post.title)}</title>
|
<title>${escapeXml(post.title)}</title>
|
||||||
<description>${escapeXml(post.description)}</description>
|
<description>${escapeXml(post.description)}</description>
|
||||||
|
<guid isPermaLink="true">https://teasanctuary.ru/blog/${post.slug}</guid>
|
||||||
<link>https://teasanctuary.ru/blog/${post.slug}</link>
|
<link>https://teasanctuary.ru/blog/${post.slug}</link>
|
||||||
<pubDate>${(new Date(post.date)).toUTCString()}</pubDate>
|
<pubDate>${(new Date(post.date)).toUTCString()}</pubDate>
|
||||||
</item>`).join("\n")}
|
</item>`).join("\n")}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue