This commit is contained in:
2026-01-18 22:25:19 +01:00
parent ba9bcbaa08
commit 76573dc378
2 changed files with 4 additions and 2 deletions

View File

@@ -9,6 +9,8 @@ type BlogEntry = {
createdAt: string,
updatedAt: string,
tags?: string[],
guid: string,
teaser: string,
};
type RPArticle = {

View File

@@ -35,7 +35,7 @@ async function getBlogEntries() {
title: '',
createdAt: '',
updatedAt: '',
teaser: `${ dom.querySelector('article').textContent.slice(0, 128) }...`,
teaser: `${ dom.querySelector('article')?.textContent.slice(0, 256).trimStart().trimEnd() }...`,
};
const metaTags = dom.querySelectorAll('meta') as unknown as NodeListOf<HTMLMetaElement>;
for (const metaTag of metaTags) {
@@ -88,7 +88,7 @@ async function rss() {
<link>${ HOST }/blog/${ article.slug }</link>
<pubDate>${ new Date(article.createdAt).toUTCString() }</pubDate>
<author>Daniel Ledda</author>
<description>${ article.content }</description>
<description>${ article.teaser }</description>
<guid>${ article.guid }</guid>
</item>
`).join('')}