Posts links now show on index
This commit is contained in:
9
build.js
9
build.js
@@ -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",
|
||||
|
||||
BIN
notes/2-a-test/assets/git.png
Normal file
BIN
notes/2-a-test/assets/git.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.3 KiB |
6
notes/2-a-test/note.md
Normal file
6
notes/2-a-test/note.md
Normal file
@@ -0,0 +1,6 @@
|
||||
# Initial commit
|
||||
|
||||
Testing
|
||||
|
||||
- testing
|
||||
[testing](https://blog.zacke.dev)
|
||||
Reference in New Issue
Block a user