diff --git a/_config/filters.js b/_config/filters.js deleted file mode 100644 index 3f247fb..0000000 --- a/_config/filters.js +++ /dev/null @@ -1,43 +0,0 @@ -import { DateTime } from "luxon"; - -export default function(eleventyConfig) { - eleventyConfig.addFilter("readableDate", (dateObj, format, zone) => { - // Formatting tokens for Luxon: https://moment.github.io/luxon/#/formatting?id=table-of-tokens - return DateTime.fromJSDate(dateObj, { zone: zone || "utc" }).toFormat(format || "dd LLLL yyyy"); - }); - - eleventyConfig.addFilter("htmlDateString", (dateObj) => { - // dateObj input: https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#valid-date-string - return DateTime.fromJSDate(dateObj, { zone: "utc" }).toFormat('yyyy-LL-dd'); - }); - - // Get the first `n` elements of a collection. - eleventyConfig.addFilter("head", (array, n) => { - if(!Array.isArray(array) || array.length === 0) { - return []; - } - if( n < 0 ) { - return array.slice(n); - } - - return array.slice(0, n); - }); - - // Return the smallest number argument - eleventyConfig.addFilter("min", (...numbers) => { - return Math.min.apply(null, numbers); - }); - - // Return the keys used in an object - eleventyConfig.addFilter("getKeys", target => { - return Object.keys(target); - }); - - eleventyConfig.addFilter("filterTagList", function filterTagList(tags) { - return (tags || []).filter(tag => ["all", "posts"].indexOf(tag) === -1); - }); - - eleventyConfig.addFilter("sortAlphabetically", strings => - (strings || []).sort((b, a) => b.localeCompare(a)) - ); -}; diff --git a/_data/eleventyDataSchema.js b/_data/eleventyDataSchema.js deleted file mode 100644 index ca764ec..0000000 --- a/_data/eleventyDataSchema.js +++ /dev/null @@ -1,13 +0,0 @@ -import { z } from "zod"; -import { fromZodError } from 'zod-validation-error'; - -export default function(data) { - // Draft content, validate `draft` front matter - let result = z.object({ - draft: z.boolean().or(z.undefined()), - }).safeParse(data); - - if(result.error) { - throw fromZodError(result.error); - } -} diff --git a/_data/metadata.js b/_data/metadata.js index e8fb984..ce80493 100644 --- a/_data/metadata.js +++ b/_data/metadata.js @@ -2,7 +2,7 @@ export default { title: "Synth.Download", url: "https://synth.download/", language: "en", - description: "a collection of services hosted for friends, but also the public. beep!", + description: "a collection of services hosted for synths and beepers and beings alike, but also the public. beep!", author: { name: "Sneexy", email: "sneexy@synth.download", diff --git a/eleventy.config.js b/eleventy.config.js index 9bda369..e4adfe1 100644 --- a/eleventy.config.js +++ b/eleventy.config.js @@ -1,7 +1,6 @@ import { minify } from "terser"; import { transform } from "lightningcss"; import eleventyNavigationPlugin from "@11ty/eleventy-navigation"; -import pluginFilters from "./_config/filters.js"; import syntaxHighlight from "@11ty/eleventy-plugin-syntaxhighlight"; export default function(eleventyConfig) { diff --git a/package-lock.json b/package-lock.json index 2d87810..c3d6e24 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,9 +14,7 @@ "@11ty/eleventy-plugin-rss": "^2.0.4", "@11ty/eleventy-plugin-syntaxhighlight": "^5.0.2", "lightningcss": "^1.30.1", - "terser": "^5.43.1", - "zod": "^3.25.76", - "zod-validation-error": "^3.5.3" + "terser": "^5.43.1" } }, "node_modules/@11ty/dependency-tree": { @@ -1949,27 +1947,6 @@ "optional": true } } - }, - "node_modules/zod": { - "version": "3.25.76", - "resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz", - "integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==", - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/colinhacks" - } - }, - "node_modules/zod-validation-error": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/zod-validation-error/-/zod-validation-error-3.5.3.tgz", - "integrity": "sha512-OT5Y8lbUadqVZCsnyFaTQ4/O2mys4tj7PqhdbBCp7McPwvIEKfPtdA6QfPeFQK2/Rz5LgwmAXRJTugBNBi0btw==", - "license": "MIT", - "engines": { - "node": ">=18.0.0" - }, - "peerDependencies": { - "zod": "^3.25.0 || ^4.0.0" - } } } } diff --git a/package.json b/package.json index a5b112e..33dae12 100644 --- a/package.json +++ b/package.json @@ -20,8 +20,6 @@ "@11ty/eleventy-plugin-rss": "^2.0.4", "@11ty/eleventy-plugin-syntaxhighlight": "^5.0.2", "lightningcss": "^1.30.1", - "terser": "^5.43.1", - "zod": "^3.25.76", - "zod-validation-error": "^3.5.3" + "terser": "^5.43.1" } }