Skip to content

Static Site Generators

View as Markdown

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. Most sites need one routing setting and nothing else.

Step-by-step guides, from your computer and from GitHub Actions: Astro, Build Awesome (formerly Eleventy), Docusaurus, Hugo, Jekyll, Publii, VitePress and WordPress, exported as a static site.

  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.
Generator Output folder Routing setting Put _redirects and _headers in
Astro dist Trailing slash, plus trailingSlash: 'always' and build: { format: 'directory' } in astro.config.mjs public/
Hugo public Trailing slash static/
Build Awesome (formerly Eleventy) _site Trailing slash A folder you pass through to the output
Jekyll _site Trailing slash, if your permalinks end in / The site root, with include: [_redirects, _headers] in _config.yml
Publii <your site>-files, in the output directory you choose Trailing slash, if Pretty URLs is on Publii’s root directory (Tools → Files)
Docusaurus build Trailing slash, plus trailingSlash: true in docusaurus.config.js static/
VitePress docs/.vitepress/dist Clean URLs, if cleanUrls is on. Otherwise none docs/public/
Gatsby public Trailing slash static/
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 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.

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.

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 redirects old addresses, rewrites paths and holds the routing settings above. It applies to Level 0 sites.
  • _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 for the rule that suits your generator.
  • Custom 404 pages: add a 404.html to the root of your output.
  • Images: convert photos to WebP or AVIF, and scale down very wide ones, while you publish.
  • Custom domains: serve the site on your own domain.

Next: Custom domains >