first
This commit is contained in:
47
eleventy.config.js
Normal file
47
eleventy.config.js
Normal file
@ -0,0 +1,47 @@
|
||||
import pluginFilters from "./_config/filters.js";
|
||||
|
||||
export default async function(eleventyConfig) {
|
||||
/* Bundles */
|
||||
/* CSS */
|
||||
eleventyConfig.addBundle("css", {
|
||||
toFileDirectory: "dist",
|
||||
bundleHtmlContentFromSelector: "style",
|
||||
});
|
||||
|
||||
/* Javascript */
|
||||
eleventyConfig.addBundle("js", {
|
||||
toFileDirectory: "dist",
|
||||
bundleHtmlContentFromSelector: "script",
|
||||
});
|
||||
|
||||
/* Passthrough */
|
||||
eleventyConfig
|
||||
.addPassthroughCopy("favicon.ico")
|
||||
.addPassthroughCopy("robots.txt");
|
||||
|
||||
/* Plugins */
|
||||
/* All filters from _config/filters.js */
|
||||
eleventyConfig.addPlugin(pluginFilters);
|
||||
|
||||
/* Shortcodes */
|
||||
eleventyConfig.addShortcode("currentBuildDate", () => {
|
||||
return (new Date()).toISOString();
|
||||
});
|
||||
|
||||
/* Watch when serving */
|
||||
eleventyConfig.addWatchTarget("css");
|
||||
|
||||
};
|
||||
|
||||
export const config = {
|
||||
dir: {
|
||||
input: "src",
|
||||
includes: "../_includes",
|
||||
layouts: "../_includes/layouts",
|
||||
data: "../_data"
|
||||
},
|
||||
markdownTemplateEngine: "njk",
|
||||
htmlTemplateEngine: "njk",
|
||||
templateFormats: ["html", "md", "njk"],
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user