Phong Duong

🔎Search

Set input and output directory in Eleventy

05-10-2020 | #eleventy

There are 2 ways to set input and out directory for your project in Eleventy: configure file and command line.

Assume you want to set src directory as input and the output is dist directory

Configure file

// .eleventy.js
module.exports = {
  dir: {
    input: "src", // default: .
    output: "dist", // default: _site
  },
};

Command line

npx @11ty/eleventy --input=src --output=dist

Share: TwitterFacebookLinkedInHacker News