Phong Duong

🔎Search

Set global data directory in Eleventy

06-10-2020 | #eleventy

You can only set global data directory by configure file. Your directory must be inside of the input directory

// .eleventy.js
module.exports = {
  dir: {
    input: "docs",
    data: "data",
  },
};

This mean the data directory is inside of the docs directory.

Share: TwitterFacebookLinkedInHacker News