Pagination, feed update, slash pages

This commit is contained in:
2025-12-13 17:25:52 -06:00
parent c5ce302fee
commit 33f73f81ed
16 changed files with 101 additions and 17 deletions

View File

@@ -66,6 +66,15 @@ export default async function (eleventyConfig) {
});
});
eleventyConfig.addCollection("onceBurned", async (collectionApi) => {
const arr = [...collectionApi.getFilteredByTag("nowBurning")].sort(
function (a, b) {
return b.date - a.date;
},
);
return arr.slice(1, arr.length);
});
// Transforms
eleventyConfig.addTransform("prettier", function (content, outputPath) {
if (outputPath && outputPath.endsWith(".html")) {
@@ -105,6 +114,7 @@ export default async function (eleventyConfig) {
return DateTime.fromJSDate(dateObj, { zone: "utc" }).toFormat("yyyy-LL-dd");
});
// Remove most recent item added to array
eleventyConfig.addFilter("removeMostRecent", (arr) => {
return arr.slice(0, arr.length - 1);
});