Import existing blog posts

This commit is contained in:
2025-03-25 21:13:49 -04:00
parent 0e6c00e44b
commit 2d533831fa
35 changed files with 5448 additions and 3 deletions

View File

@@ -7,7 +7,13 @@ import * as opml from 'opml';
export default function (eleventyConfig) {
eleventyConfig.setInputDirectory("src")
eleventyConfig.addPlugin(pugPlugin);
eleventyConfig.addPlugin(eleventyImageTransformPlugin);
eleventyConfig.addPlugin(eleventyImageTransformPlugin, {
htmlOptions: {
imgAttributes: {
alt: '',
},
},
});
eleventyConfig.addPlugin(EleventyRenderPlugin);
eleventyConfig.addPassthroughCopy("src/assets/**")
@@ -18,7 +24,7 @@ export default function (eleventyConfig) {
for ( const post of posts ) {
const year = post.date.getFullYear()
if ( !postsByYear[year] ) postsByYear[year] = []
postsByYear[year].push(post)
postsByYear[year] = [post, ...postsByYear[year]]
if ( !years.includes(year) ) years.push(year)
}