From e1634059a75054c8f7dcc5ece66d1222fb18597c Mon Sep 17 00:00:00 2001 From: Marc Pervaz Boocha Date: Sun, 15 Dec 2024 14:34:00 +0530 Subject: Updated deps --- eleventy.config.js | 30 ++-- includes/base.html | 2 +- includes/main.css | 3 +- includes/page.html | 2 +- includes/post.html | 7 +- package-lock.json | 330 +++++++++++++++++++++++++++----------------- package.json | 2 +- src/about.11tydata.js | 10 ++ src/about.html | 14 +- src/index.11tydata.js | 10 ++ src/index.html | 12 +- src/posts.11tydata.js | 10 ++ src/posts.html | 16 +-- src/posts/posts.11tydata.js | 6 +- 14 files changed, 267 insertions(+), 187 deletions(-) create mode 100644 src/about.11tydata.js create mode 100644 src/index.11tydata.js create mode 100644 src/posts.11tydata.js diff --git a/eleventy.config.js b/eleventy.config.js index afe6988..99ce9f2 100644 --- a/eleventy.config.js +++ b/eleventy.config.js @@ -3,12 +3,14 @@ import syntaxHighlightPlugin from "@11ty/eleventy-plugin-syntaxhighlight"; import { feedPlugin } from "@11ty/eleventy-plugin-rss"; import eleventyNavigationPlugin from "@11ty/eleventy-navigation"; import directoryOutputPlugin from "@11ty/eleventy-plugin-directory-output"; -import { eleventyImageTransformPlugin } from "@11ty/eleventy-img"; +import { eleventyImageTransformPlugin } from "@11ty/eleventy-img" import pluginWebc from "@11ty/eleventy-plugin-webc"; import { DateTime } from "luxon"; -export default async function(eleventyConfig) { +import { readFileSync } from 'node:fs'; + +export default async function (eleventyConfig) { eleventyConfig.addPlugin(EleventyHtmlBasePlugin); eleventyConfig.addPlugin(RenderPlugin); eleventyConfig.addPlugin(InputPathToUrlTransformPlugin); @@ -32,10 +34,12 @@ export default async function(eleventyConfig) { } }); eleventyConfig.addPlugin(eleventyNavigationPlugin); - eleventyConfig.addPlugin(directoryOutputPlugin); - - eleventyConfig.addPlugin(pluginWebc); + eleventyConfig.addPlugin(pluginWebc, { + components: [ + "npm:@11ty/eleventy-plugin-syntaxhighlight/*.webc", + ], + }); eleventyConfig.addPassthroughCopy({ "public/": "/", @@ -51,21 +55,15 @@ export default async function(eleventyConfig) { loading: "lazy" }, }); - eleventyConfig.setServerPassthroughCopyBehavior("passthrough"); - eleventyConfig.addFilter("readableDate", (dateObj, format, zone) => { - return DateTime.fromJSDate(dateObj, { zone: zone || "utc" }).toFormat(format || "dd LLLL yyyy"); - }); - - eleventyConfig.addFilter('htmlDateString', (dateObj) => { - return DateTime.fromJSDate(dateObj, { zone: 'utc' }).toFormat('yyyy-LL-dd'); + return DateTime.fromJSDate(dateObj, { zone: zone || "utc" }).toFormat(format || "dd LLLL yyyy") }); + eleventyConfig.addFilter('htmlDateString', dateObj => DateTime.fromJSDate(dateObj, { zone: 'utc' }).toFormat('yyyy-LL-dd')); + eleventyConfig.addShortcode('schema', type => (type instanceof URL ? type : new URL(type, "http://schema.org/")).href); - eleventyConfig.addShortcode('schema', (type) => { - return (type instanceof URL ? type : new URL(type, "http://schema.org/")).href; - }); + eleventyConfig.addFilter('embed', path => readFileSync(path, { encoding: 'utf8' })); eleventyConfig.setQuietMode(true); eleventyConfig.setDynamicPermalinks(false); @@ -80,5 +78,5 @@ export default async function(eleventyConfig) { data: "../data", components: "components", } - } + }; } diff --git a/includes/base.html b/includes/base.html index 90fc167..60e2b72 100644 --- a/includes/base.html +++ b/includes/base.html @@ -44,4 +44,4 @@ - + \ No newline at end of file diff --git a/includes/main.css b/includes/main.css index d1bfb19..0c3f6ad 100644 --- a/includes/main.css +++ b/includes/main.css @@ -39,7 +39,6 @@ canvas { picture { display: contents; - } @media screen { @@ -68,6 +67,7 @@ picture { padding: 1rem; font-weight: bolder; background-color: darkred; + color: white; & *:any-link { text-decoration: none; @@ -93,7 +93,6 @@ picture { } - } @media (forced-colors: active) { diff --git a/includes/page.html b/includes/page.html index 2439e37..be4f0e0 100644 --- a/includes/page.html +++ b/includes/page.html @@ -6,4 +6,4 @@