Add Zola templates and browser-tested site scaffold
This commit is contained in:
parent
fd5fc944e6
commit
a33673243e
1 changed files with 2114 additions and 0 deletions
26
assets.mjs
Normal file
26
assets.mjs
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
import { cp, mkdir, rm } from "node:fs/promises";
|
||||
import { dirname } from "node:path";
|
||||
|
||||
await rm("static/vendor", { recursive: true, force: true });
|
||||
|
||||
for (const [source, target] of [
|
||||
["@msgpack/msgpack/dist.esm", "msgpack"],
|
||||
["@msgpack/msgpack/LICENSE", "msgpack/LICENSE"],
|
||||
["mermaid/dist/mermaid.esm.min.mjs", "mermaid/mermaid.esm.min.mjs"],
|
||||
["mermaid/dist/chunks/mermaid.esm.min", "mermaid/chunks/mermaid.esm.min"],
|
||||
["mermaid/LICENSE", "mermaid/LICENSE"],
|
||||
["mathjax/tex-chtml-nofont.js", "mathjax/tex-chtml-nofont.js"],
|
||||
...["a11y", "input", "output", "sre", "ui", "LICENSE"].map((path) => [
|
||||
`mathjax/${path}`,
|
||||
`mathjax/${path}`,
|
||||
]),
|
||||
["@mathjax/mathjax-fira-font/chtml.js", "fonts/mathjax-fira-font/chtml.js"],
|
||||
["@mathjax/mathjax-fira-font/chtml", "fonts/mathjax-fira-font/chtml"],
|
||||
["mathjax/LICENSE", "fonts/mathjax-fira-font/LICENSE"],
|
||||
]) {
|
||||
await mkdir(dirname(`static/vendor/${target}`), { recursive: true });
|
||||
await cp(`node_modules/${source}`, `static/vendor/${target}`, {
|
||||
recursive: true,
|
||||
filter: (path) => !path.endsWith(".map"),
|
||||
});
|
||||
}
|
||||
Loading…
Reference in a new issue