scaffold unprompted site: eleventy, templates, gitea CI
Some checks failed
Deploy to S3 / deploy (push) Failing after 1m26s
Some checks failed
Deploy to S3 / deploy (push) Failing after 1m26s
This commit is contained in:
35
.eleventy.js
Normal file
35
.eleventy.js
Normal file
@@ -0,0 +1,35 @@
|
||||
module.exports = function (eleventyConfig) {
|
||||
eleventyConfig.addPassthroughCopy("css");
|
||||
|
||||
eleventyConfig.addCollection("columns", function (collectionApi) {
|
||||
return collectionApi
|
||||
.getFilteredByGlob("columns/**/*.md")
|
||||
.sort((a, b) => b.date - a.date);
|
||||
});
|
||||
|
||||
eleventyConfig.addFilter("year", function (date) {
|
||||
return new Date(date).getFullYear();
|
||||
});
|
||||
|
||||
eleventyConfig.addFilter("isoDate", function (date) {
|
||||
return new Date(date).toISOString().split("T")[0];
|
||||
});
|
||||
|
||||
eleventyConfig.addFilter("readableDate", function (date) {
|
||||
return new Date(date).toLocaleDateString("en-US", {
|
||||
year: "numeric",
|
||||
month: "long",
|
||||
day: "numeric",
|
||||
});
|
||||
});
|
||||
|
||||
return {
|
||||
dir: {
|
||||
input: ".",
|
||||
includes: "_includes",
|
||||
output: "_site",
|
||||
},
|
||||
markdownTemplateEngine: "njk",
|
||||
htmlTemplateEngine: "njk",
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user