diff options
Diffstat (limited to 'eleventy.config.mjs')
| -rw-r--r-- | eleventy.config.mjs | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/eleventy.config.mjs b/eleventy.config.mjs new file mode 100644 index 0000000..086ca13 --- /dev/null +++ b/eleventy.config.mjs @@ -0,0 +1,31 @@ +import { parseISO , format} from "date-fns"; +import { config as siteConfig } from "./siteconfig.mjs"; + + +export default function(eleventyConfig) { + // Order matters, put this at the top of your configuration file. + + eleventyConfig.addNunjucksFilter("date", (dateObj, formatString = 'MM.dd.yyyy') => format(dateObj, formatString)) + + eleventyConfig.addGlobalData("layout","page"); + eleventyConfig.addGlobalData("site", { + title: siteConfig.siteTitle ?? "Site", + socials: siteConfig.socials + }) + + eleventyConfig + .addPassthroughCopy({"./public/": "/"}) + .addPassthroughCopy({"./assets/": "/assets"}) + +}; +export const config = { + dir: { + input: "content", + output: "_dist", + includes: "../_includes", + layouts: "../_layouts", + }, + templateFormats: ["md", "njk"], + htmlTemplateEngine: "njk", + markdownTemplateEngine: "njk" +};
\ No newline at end of file |
