Include now entries in main RSS feed
This commit is contained in:
@@ -4,6 +4,9 @@ title: Nathan Upchurch | Changelog
|
|||||||
structuredData: none
|
structuredData: none
|
||||||
---
|
---
|
||||||
# Changelog
|
# 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
|
* 2025-11-12
|
||||||
* Added [Milne Open Textbooks](https://milneopentextbooks.org/) to [/links](/links).
|
* Added [Milne Open Textbooks](https://milneopentextbooks.org/) to [/links](/links).
|
||||||
* 2025-11-11
|
* 2025-11-11
|
||||||
|
|||||||
@@ -9,13 +9,13 @@ permalink: /feed/feed.xml
|
|||||||
<subtitle>{{ metadata.description }}</subtitle>
|
<subtitle>{{ metadata.description }}</subtitle>
|
||||||
<link href="{{ permalink | htmlBaseUrl(metadata.url) }}" rel="self"/>
|
<link href="{{ permalink | htmlBaseUrl(metadata.url) }}" rel="self"/>
|
||||||
<link href="{{ metadata.url | addPathPrefixToFullUrl }}"/>
|
<link href="{{ metadata.url | addPathPrefixToFullUrl }}"/>
|
||||||
<updated>{{ collections.posts | getNewestCollectionItemDate | dateToRfc3339 }}</updated>
|
<updated>{{ collections.feed | getNewestCollectionItemDate | dateToRfc3339 }}</updated>
|
||||||
<id>{{ metadata.url }}</id>
|
<id>{{ metadata.url }}</id>
|
||||||
<author>
|
<author>
|
||||||
<name>{{ metadata.author.name }}</name>
|
<name>{{ metadata.author.name }}</name>
|
||||||
<email>{{ metadata.author.email }}</email>
|
<email>{{ metadata.author.email }}</email>
|
||||||
</author>
|
</author>
|
||||||
{%- for post in collections.posts | reverse %}
|
{%- for post in collections.feed %}
|
||||||
{% set absolutePostUrl %}{{ post.url | htmlBaseUrl(metadata.url) }}{% endset %}
|
{% set absolutePostUrl %}{{ post.url | htmlBaseUrl(metadata.url) }}{% endset %}
|
||||||
{% if post.data.imageURL %}{% set imageURL %}{{ post.data.imageURL | htmlBaseUrl(metadata.url) }}{% endset %}{% endif %}
|
{% if post.data.imageURL %}{% set imageURL %}{{ post.data.imageURL | htmlBaseUrl(metadata.url) }}{% endset %}{% endif %}
|
||||||
{% set defaultImageURL %}{{ metadata.defaultPostImageURL | htmlBaseUrl(metadata.url) }}{% endset %}
|
{% 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 pluginNavigation from "@11ty/eleventy-navigation";
|
||||||
import prettier from "prettier";
|
import prettier from "prettier";
|
||||||
import { EleventyHtmlBasePlugin } from "@11ty/eleventy";
|
import { EleventyHtmlBasePlugin } from "@11ty/eleventy";
|
||||||
import {
|
import { dateSuffixAdder, monthMap } from "./public/js/modules/dateTools.js";
|
||||||
dateSuffixAdder,
|
|
||||||
monthMap,
|
|
||||||
timeFormatter,
|
|
||||||
} from "./public/js/modules/dateTools.js";
|
|
||||||
|
|
||||||
const figoptions = {
|
const figoptions = {
|
||||||
figcaption: true,
|
figcaption: true,
|
||||||
@@ -24,14 +20,6 @@ const timeZone = "America/Chicago";
|
|||||||
|
|
||||||
export default async function (eleventyConfig) {
|
export default async function (eleventyConfig) {
|
||||||
// Helper Functions
|
// Helper Functions
|
||||||
const multiReplace = (text, replacementTable) => {
|
|
||||||
let newText = text;
|
|
||||||
replacementTable.forEach((x) => {
|
|
||||||
newText = newText.replace(x[0], x[1]);
|
|
||||||
});
|
|
||||||
return newText;
|
|
||||||
};
|
|
||||||
|
|
||||||
eleventyConfig.addDateParsing((dateValue) => {
|
eleventyConfig.addDateParsing((dateValue) => {
|
||||||
let localDate;
|
let localDate;
|
||||||
if (dateValue instanceof Date) {
|
if (dateValue instanceof Date) {
|
||||||
@@ -69,6 +57,15 @@ export default async function (eleventyConfig) {
|
|||||||
return galleryImages;
|
return galleryImages;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
eleventyConfig.addCollection("feed", async (collectionApi) => {
|
||||||
|
return [
|
||||||
|
...collectionApi.getFilteredByTag("posts"),
|
||||||
|
...collectionApi.getFilteredByTag("now"),
|
||||||
|
].sort(function (a, b) {
|
||||||
|
return b.date - a.date;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
// Transforms
|
// Transforms
|
||||||
eleventyConfig.addTransform("prettier", function (content, outputPath) {
|
eleventyConfig.addTransform("prettier", function (content, outputPath) {
|
||||||
if (outputPath && outputPath.endsWith(".html")) {
|
if (outputPath && outputPath.endsWith(".html")) {
|
||||||
|
|||||||
Reference in New Issue
Block a user