feat: add RSS feed generation and integrate RSS link in blog pages

This commit is contained in:
2026-05-10 23:37:20 +10:00
parent 7007660a80
commit 6e1728d35e
4 changed files with 104 additions and 4 deletions

View File

@@ -55,9 +55,12 @@ export class BlogPostNode extends NodeBase {
metaDiv.style.cssText = "margin-bottom: 1em; padding-bottom: 0.5em; border-bottom: 1px solid rgba(255,255,255,0.1);";
if (post.title) {
const titleEl = document.createElement("h2");
const titleEl = document.createElement("a");
titleEl.href = `/blog/${encodeURIComponent(post.slug)}/`;
titleEl.textContent = post.title;
titleEl.style.cssText = "margin: 0 0 0.5em 0; font-size: 1.5em;";
titleEl.style.cssText = "display:block; margin: 0 0 0.5em 0; font-size: 1.5em; color: inherit; text-decoration: none;";
titleEl.addEventListener('mouseenter', () => titleEl.style.textDecoration = 'underline');
titleEl.addEventListener('mouseleave', () => titleEl.style.textDecoration = 'none');
metaDiv.appendChild(titleEl);
}
@@ -71,9 +74,12 @@ export class BlogPostNode extends NodeBase {
}
if (metaInfo.length > 0) {
const infoEl = document.createElement("div");
infoEl.style.cssText = "color: rgba(255,255,255,0.6); font-size: 0.9em;";
const infoEl = document.createElement("a");
infoEl.href = `/blog/${encodeURIComponent(post.slug)}/`;
infoEl.style.cssText = "display:block; color: rgba(255,255,255,0.6); font-size: 0.9em; text-decoration: none;";
infoEl.textContent = metaInfo.join(' • ');
infoEl.addEventListener('mouseenter', () => infoEl.style.textDecoration = 'underline');
infoEl.addEventListener('mouseleave', () => infoEl.style.textDecoration = 'none');
metaDiv.appendChild(infoEl);
}

View File

@@ -586,6 +586,20 @@ svg.world-image {
color: rgba(205, 214, 244, 0.9);
}
.rss-link {
display: flex;
align-items: center;
gap: 5px;
color: #f09040;
opacity: 0.7;
margin-left: auto;
}
.rss-link:hover {
color: #f09040;
opacity: 1;
}
/* ─── Static Blog Pages ─────────────────────────────────────────────────────── */
body.blog-page {