diff --git a/bun.lockb b/bun.lockb index 0d0b3fc9..69b7fc33 100644 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/eleventy.config.js b/eleventy.config.js index bc21e728..72a20154 100644 --- a/eleventy.config.js +++ b/eleventy.config.js @@ -4,6 +4,7 @@ const pluginRss = require("@11ty/eleventy-plugin-rss"); const metagen = require('eleventy-plugin-metagen'); const pluginTOC = require('eleventy-plugin-nesting-toc'); const emojiReadTime = require("@11tyrocks/eleventy-plugin-emoji-readtime"); +const embedEverything = require("eleventy-plugin-embed-everything"); // Configure slug filter const slugify = require("slugify"); @@ -18,28 +19,13 @@ module.exports = function (eleventyConfig) { eleventyConfig.addWatchTarget("./src/assets/"); eleventyConfig.addPassthroughCopy({ "./src/assets/feed/": "/" }); - // Filter: Format dates - const dateOptions = { - year: 'numeric', - month: 'long', - day: 'numeric', - }; - const dateTimeLocale = new Intl.DateTimeFormat("en-GB", dateOptions); - eleventyConfig.addFilter("niceDate", function(date) { - return dateTimeLocale.format(date); - }); - - // Filter: Limit - eleventyConfig.addFilter("limit", function(array, limit) { - return array.slice(0, limit); - }); - // Installed Plug-ins eleventyConfig.addPlugin(EleventyRenderPlugin); eleventyConfig.addPlugin(pluginRss); eleventyConfig.addPlugin(metagen); eleventyConfig.addPlugin(pluginTOC, { tags: ['h2', 'h3', 'h4', 'h5'] }); eleventyConfig.addPlugin(emojiReadTime); + eleventyConfig.addPlugin(embedEverything); // Configure slug filter eleventyConfig.addFilter("slug", (str) => { @@ -103,6 +89,22 @@ module.exports = function (eleventyConfig) { /* This is the part that tells 11ty to swap to our custom config */ eleventyConfig.setLibrary("md", markdownLibrary); + // Filter: Format dates + const dateOptions = { + year: 'numeric', + month: 'long', + day: 'numeric', + }; + const dateTimeLocale = new Intl.DateTimeFormat("en-GB", dateOptions); + eleventyConfig.addFilter("niceDate", function(date) { + return dateTimeLocale.format(date); + }); + + // Filter: Limit + eleventyConfig.addFilter("limit", function(array, limit) { + return array.slice(0, limit); + }); + return { dir: { input: "src" diff --git a/package.json b/package.json index c33060f2..715cce15 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ "@11ty/eleventy": "^2.0.1", "@11ty/eleventy-plugin-rss": "^1.2.0", "@11tyrocks/eleventy-plugin-emoji-readtime": "^1.0.1", + "eleventy-plugin-embed-everything": "^1.18.2", "eleventy-plugin-metagen": "^1.8.3", "eleventy-plugin-nesting-toc": "^1.3.0", "install": "^0.13.0",