First Published 07/08/2020
Github pages allows you to host your site directly from the repo on an Apex domain - essentialy it's free hosting! Even better, you can configure your Eleventy site to output to the docs
directory Github uses by making a simple config change.
Copy and paste the below into your eleventy.js
file (if you don't have one create this file in the root of your project), all we're doing here is changing the output from the default _site
directory to docs
.
module.exports = {
dir: {
output: "docs"
}
};
Once you've made this change - the next time you compile 11ty will create the docs
directory with all your site files in it.
© Daniel Canetti 2025