From 57315c52be96d2a2c013f0cfb0de5429980e301a Mon Sep 17 00:00:00 2001
From: nsfisis <nsfisis@gmail.com>
Date: Sun, 2 Nov 2025 17:49:34 +0900
Subject: refactor(blog): rename directory, services/{blog => nuldoc}/

---
 services/nuldoc/nuldoc-src/components/StaticScript.tsx | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
 create mode 100644 services/nuldoc/nuldoc-src/components/StaticScript.tsx

(limited to 'services/nuldoc/nuldoc-src/components/StaticScript.tsx')

diff --git a/services/nuldoc/nuldoc-src/components/StaticScript.tsx b/services/nuldoc/nuldoc-src/components/StaticScript.tsx
new file mode 100644
index 0000000..0e3ab19
--- /dev/null
+++ b/services/nuldoc/nuldoc-src/components/StaticScript.tsx
@@ -0,0 +1,18 @@
+import { join } from "@std/path";
+import { Config } from "../config.ts";
+import { calculateFileHash } from "./utils.ts";
+
+export default async function StaticScript(
+  { fileName, type, defer, config }: {
+    fileName: string;
+    type?: string;
+    defer?: "true";
+    config: Config;
+  },
+) {
+  const filePath = join(Deno.cwd(), config.locations.staticDir, fileName);
+  const hash = await calculateFileHash(filePath);
+  return (
+    <script src={`${fileName}?h=${hash}`} type={type} defer={defer}></script>
+  );
+}
-- 
cgit v1.2.3-70-g09d2

