Include now entries in main RSS feed
This commit is contained in:
@@ -4,6 +4,9 @@ title: Nathan Upchurch | Changelog
|
||||
structuredData: none
|
||||
---
|
||||
# Changelog
|
||||
* 2025-11-28
|
||||
* Added styling for [guestbook](/guestbook) replies now that [the reply feature](https://codeberg.org/meadowingc/guestbooks/issues/25) is live.
|
||||
* The [main RSS feed](/feed/feed.xml) now includes [now](/now) entries.
|
||||
* 2025-11-12
|
||||
* Added [Milne Open Textbooks](https://milneopentextbooks.org/) to [/links](/links).
|
||||
* 2025-11-11
|
||||
|
||||
@@ -9,13 +9,13 @@ permalink: /feed/feed.xml
|
||||
<subtitle>{{ metadata.description }}</subtitle>
|
||||
<link href="{{ permalink | htmlBaseUrl(metadata.url) }}" rel="self"/>
|
||||
<link href="{{ metadata.url | addPathPrefixToFullUrl }}"/>
|
||||
<updated>{{ collections.posts | getNewestCollectionItemDate | dateToRfc3339 }}</updated>
|
||||
<updated>{{ collections.feed | getNewestCollectionItemDate | dateToRfc3339 }}</updated>
|
||||
<id>{{ metadata.url }}</id>
|
||||
<author>
|
||||
<name>{{ metadata.author.name }}</name>
|
||||
<email>{{ metadata.author.email }}</email>
|
||||
</author>
|
||||
{%- for post in collections.posts | reverse %}
|
||||
{%- for post in collections.feed %}
|
||||
{% set absolutePostUrl %}{{ post.url | htmlBaseUrl(metadata.url) }}{% endset %}
|
||||
{% if post.data.imageURL %}{% set imageURL %}{{ post.data.imageURL | htmlBaseUrl(metadata.url) }}{% endset %}{% endif %}
|
||||
{% set defaultImageURL %}{{ metadata.defaultPostImageURL | htmlBaseUrl(metadata.url) }}{% endset %}
|
||||
|
||||
@@ -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")) {
|
||||
|
||||
Reference in New Issue
Block a user