eleventy.config.js 908 B

1234567891011121314151617181920212223242526272829
  1. module.exports = function(eleventyConfig) {
  2. // add my css file from the root folder
  3. eleventyConfig.addPassthroughCopy("bundle.css");
  4. eleventyConfig.addPassthroughCopy("img");
  5. // This line was to make sure my post.md weren't processed as Liquid, permitting this post here
  6. eleventyConfig.setTemplateFormats(["md", "njk", "html"]);
  7. eleventyConfig.addGlobalData("site.author", "unakt");
  8. // Double with the .eleventyignore file, but just in case
  9. eleventyConfig.ignores.add("/_drafts/**");
  10. eleventyConfig.ignores.add("/README.md");
  11. eleventyConfig.addLayoutAlias("post", "post.njk");
  12. eleventyConfig.addCollection("postlist", function(collectionApi) {
  13. return collectionApi.getFilteredByGlob("./posts/*.md");
  14. });
  15. return {
  16. // Ok idk this prevent markdown from being processed?
  17. markdownTemplateEngine: false,
  18. dir: {
  19. input: "./",
  20. output: "_site",
  21. layouts: "layouts",
  22. includes: "includes"
  23. }
  24. };
  25. };