work.suroh.tk/node_modules/@11ty/eleventy/test/stubs/config.js

38 lines
625 B
JavaScript

const pretty = require("pretty");
module.exports = function(config) {
/* {
template,
inputPath,
outputPath,
url,
data,
date
} */
return {
markdownTemplateEngine: "ejs",
templateFormats: ["md", "njk"],
pathPrefix: "/testdir",
keys: {
package: "pkg2"
},
filters: {
prettyHtml: function(str, outputPath) {
if (outputPath.split(".").pop() === "html") {
return pretty(str, { ocd: true });
} else {
return str;
}
}
},
nunjucksFilters: {
testing: str => {
return str;
}
}
};
};