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", title: "index",
mtime: new Date(), mtime: new Date(),
path: "/index.html", 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) => ` const renderItem = (item: Item) => `
<item> <item>
<title>${item.title}</title> <title>${item.title}</title>
<guid>${item.path}</guid> <guid>${item.path.replace(/\.md$/, ".html")}</guid>
<link>https://celery.eu.org/blog/${item.path}</link> <link>https://celery.eu.org/blog/${item.path.replace(/\.md$/, ".html")}</link>
<content type="html">${marked.parse(item.content)}</content> <content type="html">${marked.parse(item.content)}</content>
<updated>${item.mtime.toISOString()}</updated> <updated>${item.mtime.toISOString()}</updated>
</item> </item>

View file

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