Posts links now show on index

This commit is contained in:
2023-09-15 22:41:51 +02:00
parent 24fd81c32c
commit 74b1eb46bc
3 changed files with 14 additions and 1 deletions

View File

@@ -60,7 +60,14 @@ let htmlTemplate = fs.readFileSync(
const links = manifest.map(
(m) => `<a href='/${m.directoryName}.html'>${m.name}</a>`
);
htmlTemplate = htmlTemplate.replace("{{content}}", links);
const unorderedListItems = links.map((l) => `<li>${l}</li>`).join("\r\n");
const html = `
<ul>
${unorderedListItems}
<ul>
`;
htmlTemplate = htmlTemplate.replace("{{content}}", html);
fs.writeFileSync(`${paths.output}/index.html`, htmlTemplate, {
encoding: "utf-8",
flag: "ax",

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

6
notes/2-a-test/note.md Normal file
View File

@@ -0,0 +1,6 @@
# Initial commit
Testing
- testing
[testing](https://blog.zacke.dev)