fix index links

This commit is contained in:
tezlm 2024-10-09 14:44:32 -07:00
parent 486daadaf8
commit b549e40015
Signed by: tezlm
GPG key ID: 649733FCD94AFBBA
2 changed files with 4 additions and 4 deletions

View file

@ -47,15 +47,15 @@ const renderIndex = (entries: Array<Item>) => {
title: "index",
mtime: new Date(),
path: "/index.html",
content: "\n\n" + a.map(i => `- [${i.title}](${i.path})`).join("\n"),
content: "\n\n" + a.map(i => `- [${i.title}](${i.path.replace(/\.md$/, ".html")})`).join("\n"),
});
}
const renderItem = (item: Item) => `
<item>
<title>${item.title}</title>
<guid>${item.path}</guid>
<link>https://celery.eu.org/blog/${item.path}</link>
<guid>${item.path.replace(/\.md$/, ".html")}</guid>
<link>https://celery.eu.org/blog/${item.path.replace(/\.md$/, ".html")}</link>
<content type="html">${marked.parse(item.content)}</content>
<updated>${item.mtime.toISOString()}</updated>
</item>

View file

@ -14,7 +14,7 @@
</header>
<article>
<ul>
<li><a href="hello.md">Hello, world!</a></li>
<li><a href="hello.html">Hello, world!</a></li>
</ul>
</article>