2025-04-18 11:53:23 -04:00
|
|
|
import { feedPlugin } from "@11ty/eleventy-plugin-rss";
|
|
|
|
|
|
|
|
import metadata from "./_data/metadata.js";
|
2025-04-16 22:47:29 -04:00
|
|
|
import pluginFilters from "./_config/filters.js";
|
|
|
|
|
|
|
|
export default async function(eleventyConfig) {
|
2025-04-17 10:17:22 -04:00
|
|
|
eleventyConfig.setUseGitIgnore(false);
|
|
|
|
|
2025-05-01 12:20:48 -04:00
|
|
|
eleventyConfig.addPlugin(pluginFilters);
|
2025-04-16 22:47:29 -04:00
|
|
|
|
2025-04-18 11:53:23 -04:00
|
|
|
eleventyConfig.addPlugin(feedPlugin, {
|
|
|
|
type: "atom",
|
|
|
|
outputPath: "/feed.xml",
|
|
|
|
collection: {
|
|
|
|
name: "posts",
|
|
|
|
limit: 10
|
|
|
|
},
|
|
|
|
metadata: {
|
|
|
|
title: metadata.title,
|
|
|
|
subtitle: metadata.description,
|
|
|
|
base: metadata.url,
|
|
|
|
author: {
|
|
|
|
name: metadata.author.name
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
2025-04-16 22:47:29 -04:00
|
|
|
eleventyConfig.addCollection("series", collectionsApi => {
|
|
|
|
const seriesNames = collectionsApi.
|
|
|
|
getFilteredByTag("posts").
|
|
|
|
filter(post => post.data.series != null).
|
|
|
|
map(post => post.data.series.name).
|
|
|
|
sort();
|
|
|
|
|
|
|
|
return [...new Set(seriesNames)];
|
|
|
|
});
|
|
|
|
|
|
|
|
eleventyConfig.addCollection("site_nav", collectionsApi => {
|
|
|
|
return collectionsApi.
|
2025-04-17 08:58:05 -04:00
|
|
|
getAll().
|
2025-04-16 22:47:29 -04:00
|
|
|
filter(page => page.data.nav_order).
|
|
|
|
sort((a, b) => a.data.nav_order - b.data.nav_order);
|
|
|
|
});
|
2025-04-18 11:28:28 -04:00
|
|
|
|
|
|
|
eleventyConfig.addPassthroughCopy({
|
|
|
|
"./content/resources/": "/"
|
|
|
|
});
|
2025-04-16 22:47:29 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
export const config = {
|
|
|
|
dir: {
|
|
|
|
input: 'content',
|
|
|
|
includes: '../_includes',
|
|
|
|
data: '../_data',
|
|
|
|
output: 'dist'
|
|
|
|
}
|
|
|
|
};
|