remove old junk
All checks were successful
/ build (push) Successful in 26s

This commit is contained in:
Ruben 2025-09-16 10:22:14 -05:00
commit a46df994d5
Signed by: sneexy
GPG key ID: 8ECFA045E63BC583
6 changed files with 3 additions and 85 deletions

View file

@ -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))
);
};

View file

@ -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);
}
}

View file

@ -2,7 +2,7 @@ export default {
title: "Synth.Download", title: "Synth.Download",
url: "https://synth.download/", url: "https://synth.download/",
language: "en", 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: { author: {
name: "Sneexy", name: "Sneexy",
email: "sneexy@synth.download", email: "sneexy@synth.download",

View file

@ -1,7 +1,6 @@
import { minify } from "terser"; import { minify } from "terser";
import { transform } from "lightningcss"; import { transform } from "lightningcss";
import eleventyNavigationPlugin from "@11ty/eleventy-navigation"; import eleventyNavigationPlugin from "@11ty/eleventy-navigation";
import pluginFilters from "./_config/filters.js";
import syntaxHighlight from "@11ty/eleventy-plugin-syntaxhighlight"; import syntaxHighlight from "@11ty/eleventy-plugin-syntaxhighlight";
export default function(eleventyConfig) { export default function(eleventyConfig) {

25
package-lock.json generated
View file

@ -14,9 +14,7 @@
"@11ty/eleventy-plugin-rss": "^2.0.4", "@11ty/eleventy-plugin-rss": "^2.0.4",
"@11ty/eleventy-plugin-syntaxhighlight": "^5.0.2", "@11ty/eleventy-plugin-syntaxhighlight": "^5.0.2",
"lightningcss": "^1.30.1", "lightningcss": "^1.30.1",
"terser": "^5.43.1", "terser": "^5.43.1"
"zod": "^3.25.76",
"zod-validation-error": "^3.5.3"
} }
}, },
"node_modules/@11ty/dependency-tree": { "node_modules/@11ty/dependency-tree": {
@ -1949,27 +1947,6 @@
"optional": true "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"
}
} }
} }
} }

View file

@ -20,8 +20,6 @@
"@11ty/eleventy-plugin-rss": "^2.0.4", "@11ty/eleventy-plugin-rss": "^2.0.4",
"@11ty/eleventy-plugin-syntaxhighlight": "^5.0.2", "@11ty/eleventy-plugin-syntaxhighlight": "^5.0.2",
"lightningcss": "^1.30.1", "lightningcss": "^1.30.1",
"terser": "^5.43.1", "terser": "^5.43.1"
"zod": "^3.25.76",
"zod-validation-error": "^3.5.3"
} }
} }