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",
|
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>
|
||||||
|
|
|
@ -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>
|
||||||
|
|
Loading…
Reference in a new issue