Menu
- Why Eleventy?
- Get Started
- Community
- Working with Templates
- Using Data
- Configuration
- Template Languages
- Plugins
- API Services
- Release History
- Advanced
1.93s
29.05s
Deployment
Now that youβve built a web site with Eleventy (even if itβs one HTML page!) you might be ready to put it on the web for everyone to see! There are a bunch of different ways to do it!
A standard Eleventy build (e.g. running npx @11ty/eleventy
) is a production-ready build by default. Eleventy doesnβt change its build behavior internally for development versus production.
If you want to customize Eleventy to do your own local development/production optimizations, environment variables are a common solution to accomplish that goal.
Providers Jump to heading
Take a look at the list below for some ideas on where to deploy your Eleventy project. There are many deployment options available and this is not meant to be an exhaustive list.
Classic Web Hosts Jump to heading
Eleventy can work with any web host that supports static files!
With these hosts deployment is not automatically triggered for you, so after you run the Eleventy build command youβll need to upload your Eleventy output directory (defaults to _site
) to the host manually.
This is a great place to start if youβre not familiar with source control (e.g. git or GitHub).
Jamstack Providers Jump to heading
Jamstack providers can trigger your Eleventy build command automatically when you commit a file to your source control repository (GitHub, GitLab, Codeberg, etc.) and deploy Eleventyβs build output directory for you.
Use an npm Script Jump to heading
One common practice when deploying Eleventy via a Jamstack provider is to use an npm script to run your build command. This is configured in your package.json
file and could look like this:
{
"scripts": {
"build": "npx @11ty/eleventy"
}
}
This allows you to configure your host to run npm run build
and allows you to make future changes to that command in your code and not the hostβs configuration.
Edit on the Web Jump to heading
There are some great Web editors popping up that you can use to run and edit Eleventy projects online! Here are some options:
Related Jump to heading
From the Community Jump to heading
Γ36 resources courtesy of 11tybundle.dev curated by Bob Monsour