Black Lives Matter
Eleventy
The possum is Eleventy’s mascot
Eleventy Documentation
Menu
Eleventy 5.81s
Astro 12.52s

Deployment

Contents

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:

Filename package.json
{
"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:

From the Community Jump to heading

×51 resources courtesy of 11tybundle.dev curated by IndieWeb Avatar for https://www.bobmonsour.com/Bob Monsour

Expand to see 46 more resources.

Other pages in Getting Started: