From 98abcc023b99898f3a7e182e2330ea809a4c99e2 Mon Sep 17 00:00:00 2001
From: nsfisis <nsfisis@gmail.com>
Date: Sun, 12 Jan 2025 19:43:59 +0900
Subject: refactor(blog/nuldoc): convert components/*.ts to TSX

---
 vhosts/blog/nuldoc-src/components/StaticStylesheet.tsx | 11 +++++++++++
 1 file changed, 11 insertions(+)
 create mode 100644 vhosts/blog/nuldoc-src/components/StaticStylesheet.tsx

(limited to 'vhosts/blog/nuldoc-src/components/StaticStylesheet.tsx')

diff --git a/vhosts/blog/nuldoc-src/components/StaticStylesheet.tsx b/vhosts/blog/nuldoc-src/components/StaticStylesheet.tsx
new file mode 100644
index 00000000..5c2c2a0f
--- /dev/null
+++ b/vhosts/blog/nuldoc-src/components/StaticStylesheet.tsx
@@ -0,0 +1,11 @@
+import { join } from "std/path/mod.ts";
+import { Config } from "../config.ts";
+import { calculateFileHash } from "./utils.ts";
+
+export default async function StaticStylesheet(
+  { fileName, config }: { fileName: string; config: Config },
+) {
+  const filePath = join(Deno.cwd(), config.locations.staticDir, fileName);
+  const hash = await calculateFileHash(filePath);
+  return <link rel="stylesheet" href={`${fileName}?h=${hash}`} />;
+}
-- 
cgit v1.2.3-70-g09d2

