Skip to content

Commit

Permalink
Merge pull request #43 from freedomofpress/add-blog
Browse files Browse the repository at this point in the history
Add a basic blog and RSS feed
  • Loading branch information
harrislapiroff authored Aug 21, 2024
2 parents b1e5480 + 114c832 commit 141c0c8
Show file tree
Hide file tree
Showing 10 changed files with 275 additions and 91 deletions.
23 changes: 17 additions & 6 deletions eleventy.config.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,27 @@
const pluginRss = require("@11ty/eleventy-plugin-rss");

module.exports = function(eleventyConfig) {
eleventyConfig.addPassthroughCopy("src/assets")
eleventyConfig.addPassthroughCopy("src/favicon.ico")
eleventyConfig.addPassthroughCopy("src/assets");
eleventyConfig.addPassthroughCopy("src/favicon.ico");
eleventyConfig.addPlugin(pluginRss);

eleventyConfig.addCollection("posts", function(collection) {
return collection.getFilteredByGlob("src/posts/*.md");
})
return collection.getFilteredByGlob("src/news/*.md");
});

eleventyConfig.addFilter("dateIso", date => {
return date.toISOString();
});

eleventyConfig.addFilter("dateReadable", date => {
return date.toDateString();
});

return {
dir: {
input: "src",
output: "dist",
includes: '_layouts',
includes: "_layouts"
}
}
};
}
146 changes: 89 additions & 57 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 141c0c8

Please sign in to comment.