diff --git a/_config.ts b/_config.ts index 8598eb6..8fb8244 100644 --- a/_config.ts +++ b/_config.ts @@ -36,12 +36,14 @@ site.use(feed({ info: { title: "Foster Hangdaan's Blog", description: "My thoughts and ideas.", - date: new Date(), + published: new Date(), lang: "en", }, items: { title: "=title", description: "=description", + published: "=date", + updated: "=updated", } })); site.use(code_highlight({ @@ -59,16 +61,18 @@ site.use(toc({ })); site.use(footnotes()); -site.process([".html"], (page) => { - // NOTE: This is a hack to append a class to JS doctrings so that we - // can style them. If only the Hightlight.js plugin could be configured - // to do this instead. - page.document?.getElementsByClassName("hljs-comment").forEach((codeCommentElement) => { - const docStringRegex = /^\/\*\*.*\*\/$/gsm; - const matchResult = codeCommentElement.innerText.match(docStringRegex); - if (matchResult) { - codeCommentElement.classList.add("docstring"); - } +site.process([".html"], (pages) => { + pages.forEach((page) => { + // NOTE: This is a hack to append a class to JS doctrings so that we + // can style them. If only the Hightlight.js plugin could be configured + // to do this instead. + page.document?.getElementsByClassName("hljs-comment").forEach((codeCommentElement) => { + const docStringRegex = /^\/\*\*.*\*\/$/gsm; + const matchResult = codeCommentElement.innerText.match(docStringRegex); + if (matchResult) { + codeCommentElement.classList.add("docstring"); + } + }); }); }); diff --git a/deno.json b/deno.json index a9b0660..f1a8d68 100644 --- a/deno.json +++ b/deno.json @@ -1,16 +1,20 @@ { "compilerOptions": { "jsx": "react-jsx", - "jsxImportSource": "react" + "jsxImportSource": "npm:react", + "types": [ + "https://unpkg.com/@types/react@18.2.37/index.d.ts", + "lume/types.ts" + ] }, "tasks": { - "lume": "echo \"import 'lume/cli.ts'\" | deno run --unstable --allow-write='.' --allow-read='.' --allow-net='deno.land,cdn.deno.land,esm.sh,0.0.0.0:8080' --allow-sys=networkInterfaces --allow-env='LUME_ENV,LUME_LIVE_RELOAD' -", + "lume": "echo \"import 'lume/cli.ts'\" | deno run --unstable --allow-write='.' --allow-read='.' --allow-net='deno.land,cdn.deno.land,esm.sh,0.0.0.0:8080' --allow-sys=networkInterfaces --allow-env='LUME_ENV,LUME_LIVE_RELOAD,LUME_LOGS,LUME_NOCACHE,LUME_DRAFTS' -", "build": "deno task lume", "serve": "deno task lume -s", "deploy": "rsync -avh --progress --delete ./_site/ podman:/srv/www/fosterhangdaan.com/" }, "imports": { "react/jsx-runtime": "https://esm.sh/react@18.2.0/jsx-runtime", - "lume/": "https://deno.land/x/lume@v1.19.4/" + "lume/": "https://deno.land/x/lume@v2.0.0/" } } diff --git a/deno.lock b/deno.lock index bf8a338..7918535 100644 Binary files a/deno.lock and b/deno.lock differ