Pagination, feed update, slash pages
This commit is contained in:
@@ -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);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user