fix index links
This commit is contained in:
parent
486daadaf8
commit
b549e40015
2 changed files with 4 additions and 4 deletions
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue