From b206b17dfffee47940d391dd8dfbcfd79cc6861e Mon Sep 17 00:00:00 2001
From: nsfisis <nsfisis@gmail.com>
Date: Fri, 25 Apr 2025 22:36:47 +0900
Subject: feat(blog/nuldoc): add `defer` attribute to some `script` tags

---
 vhosts/blog/nuldoc-src/components/StaticScript.tsx | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

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

diff --git a/vhosts/blog/nuldoc-src/components/StaticScript.tsx b/vhosts/blog/nuldoc-src/components/StaticScript.tsx
index e3b103cc..0e3ab194 100644
--- a/vhosts/blog/nuldoc-src/components/StaticScript.tsx
+++ b/vhosts/blog/nuldoc-src/components/StaticScript.tsx
@@ -3,15 +3,16 @@ import { Config } from "../config.ts";
 import { calculateFileHash } from "./utils.ts";
 
 export default async function StaticScript(
-  { fileName, type, config }: {
+  { 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 } : {})}></script>
+    <script src={`${fileName}?h=${hash}`} type={type} defer={defer}></script>
   );
 }
-- 
cgit v1.2.3-70-g09d2

