Change the default directories
By default, Eleventy looks for your source files in the root directory and outputs files to _site. You can change these defaults from the command line when running Eleventy, or by setting them in .eleventy.js. This helps keep your site files separate from your Eleventy config and other project files.
Directions
- Change the input directories from the command line
npx @11ty/eleventy --input=_src --output=_site
**OR**
-
Open .eleventy.js
-
Within the module.exports function , enter the following
module.exports = function(eleventyConfig) {
return {
dir: {
input: '_src',
output: '_site'
}
};
};