This commit is contained in:
41666 2023-10-01 17:56:34 -04:00
parent d0957bf85a
commit 8cbe93d74d
8 changed files with 152 additions and 3 deletions

View file

@ -18,6 +18,8 @@ https://art.mekanoe.com
`bun serve` to serve them locally
`bun dev` if you're developing the templates for auto-generation.
### Infrastructure
- The "generator" does

View file

@ -13,7 +13,8 @@ for (const htmlFile of allHtmls) {
const allWorks = globSync("html/*.js")
.map((file) => file.replace("html/", "").replace(".js", ""))
.filter((work) => work !== "platform");
.sort()
.reverse();
console.log({ allWorks });
@ -25,13 +26,16 @@ for (const work of allWorks) {
const index = indexTemplate.replace(
"<!--/INSERT/-->",
allWorks.map((work) => `<li><a href="/${work}">./${work}</a></li>`).join("\n")
allWorks
.map((work) => `<li><a href="/${work}">./${work}</a></li>`)
.join("\n ")
);
await Bun.write("html/index.html", index);
const readme = readmeTemplate.replace(
"<!--/INSERT/-->",
allWorks
.reverse()
.map((work) => `- [./${work}](https://art.mekanoe.com/${work})`)
.join("\n")
);