aboutsummaryrefslogtreecommitdiffhomepage
path: root/nuldoc-src/pages
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2023-03-20 20:45:21 +0900
committernsfisis <nsfisis@gmail.com>2023-03-20 20:45:21 +0900
commitab4c36fa056fcf0d1dc1f7c2301630cd88f783fe (patch)
treefadcfb0a37cd3ec97f5c8297a5a9f8aafcdc2295 /nuldoc-src/pages
parent899ab9679f6c7a4b9e32b49ada823168b2c9738d (diff)
downloadblog.nsfisis.dev-ab4c36fa056fcf0d1dc1f7c2301630cd88f783fe.tar.gz
blog.nsfisis.dev-ab4c36fa056fcf0d1dc1f7c2301630cd88f783fe.tar.zst
blog.nsfisis.dev-ab4c36fa056fcf0d1dc1f7c2301630cd88f783fe.zip
feat(nuldoc): support cache busting for JavaScript files
Diffstat (limited to 'nuldoc-src/pages')
-rw-r--r--nuldoc-src/pages/slide.ts14
1 files changed, 3 insertions, 11 deletions
diff --git a/nuldoc-src/pages/slide.ts b/nuldoc-src/pages/slide.ts
index f2955af..e5f40a0 100644
--- a/nuldoc-src/pages/slide.ts
+++ b/nuldoc-src/pages/slide.ts
@@ -2,6 +2,7 @@ import { join } from "std/path/mod.ts";
import { globalFooter } from "../components/global_footer.ts";
import { globalHeader } from "../components/global_header.ts";
import { pageLayout } from "../components/page_layout.ts";
+import { staticScriptElement } from "../components/utils.ts";
import { Config } from "../config.ts";
import { el, text } from "../dom.ts";
import { Page } from "../page.ts";
@@ -100,17 +101,8 @@ export async function generateSlidePage(
el("button", [["id", "prev"]], text("Prev")),
el("button", [["id", "next"]], text("Next")),
),
- el(
- "script",
- [[
- "src",
- "https://cdnjs.cloudflare.com/ajax/libs/pdf.js/3.4.120/pdf.min.js",
- ]],
- ),
- el(
- "script",
- [["src", "/slide.js"], ["type", "module"]],
- ),
+ await staticScriptElement("/pdf.min.js", [], config),
+ await staticScriptElement("/slide.js", [["type", "module"]], config),
),
),
),