Include now entries in main RSS feed

This commit is contained in:
2025-11-28 18:36:50 -06:00
parent 50e2733af2
commit df007a9d21
3 changed files with 15 additions and 15 deletions

View File

@@ -10,11 +10,7 @@ import pluginBundle from "@11ty/eleventy-plugin-bundle";
import pluginNavigation from "@11ty/eleventy-navigation";
import prettier from "prettier";
import { EleventyHtmlBasePlugin } from "@11ty/eleventy";
import {
dateSuffixAdder,
monthMap,
timeFormatter,
} from "./public/js/modules/dateTools.js";
import { dateSuffixAdder, monthMap } from "./public/js/modules/dateTools.js";
const figoptions = {
figcaption: true,
@@ -24,14 +20,6 @@ const timeZone = "America/Chicago";
export default async function (eleventyConfig) {
// Helper Functions
const multiReplace = (text, replacementTable) => {
let newText = text;
replacementTable.forEach((x) => {
newText = newText.replace(x[0], x[1]);
});
return newText;
};
eleventyConfig.addDateParsing((dateValue) => {
let localDate;
if (dateValue instanceof Date) {
@@ -69,6 +57,15 @@ export default async function (eleventyConfig) {
return galleryImages;
});
eleventyConfig.addCollection("feed", async (collectionApi) => {
return [
...collectionApi.getFilteredByTag("posts"),
...collectionApi.getFilteredByTag("now"),
].sort(function (a, b) {
return b.date - a.date;
});
});
// Transforms
eleventyConfig.addTransform("prettier", function (content, outputPath) {
if (outputPath && outputPath.endsWith(".html")) {