From 674fe965550444db87edc7937ff6932e1a918d9d Mon Sep 17 00:00:00 2001
From: nsfisis <nsfisis@gmail.com>
Date: Fri, 27 Jun 2025 23:39:31 +0900
Subject: feat(meta): rename vhosts/ directory to services/

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

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

diff --git a/services/blog/nuldoc-src/components/StaticScript.tsx b/services/blog/nuldoc-src/components/StaticScript.tsx
new file mode 100644
index 00000000..0e3ab194
--- /dev/null
+++ b/services/blog/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

