summaryrefslogtreecommitdiffhomepage
path: root/vhosts/blog/nuldoc-src/components/utils.ts
diff options
context:
space:
mode:
Diffstat (limited to 'vhosts/blog/nuldoc-src/components/utils.ts')
-rw-r--r--vhosts/blog/nuldoc-src/components/utils.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/vhosts/blog/nuldoc-src/components/utils.ts b/vhosts/blog/nuldoc-src/components/utils.ts
index 5d57d033..ce693100 100644
--- a/vhosts/blog/nuldoc-src/components/utils.ts
+++ b/vhosts/blog/nuldoc-src/components/utils.ts
@@ -9,17 +9,17 @@ export async function stylesheetLinkElement(
): Promise<Element> {
const filePath = join(Deno.cwd(), config.locations.staticDir, fileName);
const hash = await calculateFileHash(filePath);
- return el("link", [["rel", "stylesheet"], ["href", `${fileName}?h=${hash}`]]);
+ return el("link", { rel: "stylesheet", href: `${fileName}?h=${hash}` });
}
export async function staticScriptElement(
fileName: string,
- attrs: [string, string][],
+ attrs: Record<string, string>,
config: Config,
): Promise<Element> {
const filePath = join(Deno.cwd(), config.locations.staticDir, fileName);
const hash = await calculateFileHash(filePath);
- return el("script", [["src", `${fileName}?h=${hash}`], ...attrs]);
+ return el("script", { src: `${fileName}?h=${hash}`, ...attrs });
}
async function calculateFileHash(