From c6abf7e39dca78ebc31a9f1960f8352e98a58913 Mon Sep 17 00:00:00 2001 From: jonathan Date: Wed, 11 Oct 2023 18:56:56 +1030 Subject: [PATCH] add lightbox to infinite nightmare --- .eleventy.js | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/.eleventy.js b/.eleventy.js index a52c6d0..0609214 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -39,6 +39,18 @@ module.exports = function (eleventyConfig) { return ''; }; + var slug = title + .toLowerCase() + .trim() + // remove accents + .normalize('NFD') + .replace(/[\u0300-\u036f]/g, '') + // replace invalid characters with spaces + .replace(/[^a-z0-9\s-]/g, ' ') + .trim() + // replace multiple spaces or hyphens with a hyphen + .replace(/[\s-]+/g, '-'); + return `

${title}
@@ -53,8 +65,9 @@ module.exports = function (eleventyConfig) { }${!image || image == "" ? "" : Array.isArray(image) ? - image.map((i) => `
`).join(" ") : - `
` + image.map((i) => `
`).join(" ") : + `
+ ` }${!video || video == "" ? "" : `