# Static Site Generators

> Deploy the output of Astro, Hugo, Build Awesome (formerly Eleventy), Jekyll, Vite, VitePress, Docusaurus, Gatsby and other static site generators: output folders and the one routing setting each needs.

Source: https://docs.evolvingedge.ai/static-sites/

Any static site generator works with Evolving Edge: build your site, then deploy the output folder as a workload, from the portal or with the [command line](https://docs.evolvingedge.ai/cli/). Most sites need one routing setting and nothing else.

Step-by-step guides, from your computer and from GitHub Actions: [Astro](https://docs.evolvingedge.ai/static-sites/astro/), [Build Awesome (formerly Eleventy)](https://docs.evolvingedge.ai/static-sites/build-awesome/), [Docusaurus](https://docs.evolvingedge.ai/static-sites/docusaurus/), [Hugo](https://docs.evolvingedge.ai/static-sites/hugo/), [Jekyll](https://docs.evolvingedge.ai/static-sites/jekyll/), [Publii](https://docs.evolvingedge.ai/static-sites/publii/), [VitePress](https://docs.evolvingedge.ai/static-sites/vitepress/) and [WordPress](https://docs.evolvingedge.ai/static-sites/wordpress/), exported as a static site.

## How it works

1. **Build your site** as you normally do. Your generator writes a folder of HTML, CSS, JavaScript and images.
2. **Deploy that folder.** Upload it in the portal, or run `ee-deploy` from your computer or CI. `ee-deploy` finds the output folder of most generators by itself.
3. **Add a routing setting if your generator needs one.** It's one line in a `_redirects` file. The table below says which.

## Your generator

| Generator | Output folder | Routing setting | Put `_redirects` and `_headers` in |
|---|---|---|---|
| [Astro](https://docs.evolvingedge.ai/static-sites/astro/) | `dist` | Trailing slash, plus `trailingSlash: 'always'` and `build: { format: 'directory' }` in `astro.config.mjs` | `public/` |
| [Hugo](https://docs.evolvingedge.ai/static-sites/hugo/) | `public` | Trailing slash | `static/` |
| [Build Awesome (formerly Eleventy)](https://docs.evolvingedge.ai/static-sites/build-awesome/) | `_site` | Trailing slash | A folder you pass through to the output |
| [Jekyll](https://docs.evolvingedge.ai/static-sites/jekyll/) | `_site` | Trailing slash, if your permalinks end in `/` | The site root, with `include: [_redirects, _headers]` in `_config.yml` |
| [Publii](https://docs.evolvingedge.ai/static-sites/publii/) | `<your site>-files`, in the output directory you choose | Trailing slash, if Pretty URLs is on | Publii's root directory (**Tools → Files**) |
| [Docusaurus](https://docs.evolvingedge.ai/static-sites/docusaurus/) | `build` | Trailing slash, plus `trailingSlash: true` in `docusaurus.config.js` | `static/` |
| [VitePress](https://docs.evolvingedge.ai/static-sites/vitepress/) | `docs/.vitepress/dist` | Clean URLs, if `cleanUrls` is on. Otherwise none | `docs/public/` |
| Gatsby | `public` | Trailing slash | `static/` |
| [WordPress](https://docs.evolvingedge.ai/static-sites/wordpress/), exported with Simply Static | The export folder | Trailing slash | The root of the export |
| Vite (single-page app) | `dist` | A rewrite to `index.html`. See [Single-page apps](https://docs.evolvingedge.ai/custom-404/#single-page-apps) | `public/` |
| Quartz, Observable Framework, vite-ssg | Varies | Clean URLs | Your static folder |
| Rspress, VuePress, HonKit | Varies | Clean URLs, if their `cleanUrls` option is on. Otherwise none | Your static folder |

Check the output folder of your own project: a custom configuration can change it.

## The two routing settings

Pages are served at exactly the address that matches a file. Which setting you need depends on how your generator writes pages.

**Pages written as folders** (`about/index.html`, served at `/about/`). Without a setting, `/about` with no slash is a 404. Add this line to `_redirects` to redirect it to `/about/`:

```
# ee:trailing-slash on
```

**Pages written as `.html` files** (`about.html`, linked as `/about`). Add this line to serve `/about` from `about.html`:

```
# ee:clean-urls on
```

If you deploy with `ee-deploy`, you can pass `--trailing-slash` or `--clean-urls` instead of editing the file.

Both are covered in full, with how they combine, in [Redirects and rewrites](https://docs.evolvingedge.ai/redirects/#routing-settings).

## Going further

Two optional files in the root of your build output control the rest. Both use the same format as Netlify, so files you already have usually work unchanged.

- **[`_redirects`](https://docs.evolvingedge.ai/redirects/)** redirects old addresses, rewrites paths and holds the routing settings above. It applies to Level 0 sites.
- **[`_headers`](https://docs.evolvingedge.ai/headers/)** sets response headers, including security headers and how long files are cached. It applies to Level 0 and Level 2 sites. See [caching hashed assets](https://docs.evolvingedge.ai/headers/#caching-hashed-assets-for-a-year) for the rule that suits your generator.
- **[Custom 404 pages](https://docs.evolvingedge.ai/custom-404/):** add a `404.html` to the root of your output.
- **[Images](https://docs.evolvingedge.ai/image-conversion/):** convert photos to WebP or AVIF, and scale down very wide ones, while you publish.
- **[Custom domains](https://docs.evolvingedge.ai/custom-domains/):** serve the site on your own domain.

**Next:** [Custom domains >](https://docs.evolvingedge.ai/custom-domains/)
