23 lines
528 B
JavaScript
23 lines
528 B
JavaScript
const path = require("path");
|
|
|
|
module.exports = function(eleventyConfig) {
|
|
eleventyConfig.addPassthroughCopy("static");
|
|
eleventyConfig.addWatchTarget("static");
|
|
|
|
eleventyConfig.addNunjucksFilter("domain", function(input) {
|
|
return (new URL(input)).hostname;
|
|
});
|
|
|
|
eleventyConfig.addNunjucksFilter("date", function(input) {
|
|
return (new Date(input)).toLocaleDateString("en-GB", {
|
|
day: "numeric",
|
|
month: "short",
|
|
year: "numeric"
|
|
});
|
|
});
|
|
|
|
return {
|
|
pathPrefix: "/~jakew/cookbook/"
|
|
}
|
|
}
|