Eleventy is already thinking in files

Eleventy (11ty) transforms templates into a directory of pages. That worldview matches StaticHost: zip or GitHub the output, serve over HTTPS, roll back if needed. No remote npx @11ty/eleventy, no serverless layer, no SPA fallback. nginx: try_files $uri $uri/ =404.

Preview URLs get HTTPS immediately. Custom domains receive certificates after DNS verifies. Billing is honest: ~1 day trial, then Starter $9 (1 site, 2 GB), Pro $30 (3 sites, 10 GB, staging), Scale $65 (10×30 GB), Business $130 (30×100 GB, teams). No forever-free, email, cPanel, or built-in CDN product.

Configure output and path prefixes

.eleventy.js / eleventy.config.js:

export default function (eleventyConfig) {
  eleventyConfig.addPassthroughCopy("css")
  eleventyConfig.addPassthroughCopy("images")

  return {
    dir: {
      input: "src",
      output: "_site",
      includes: "_includes",
    },
    pathPrefix: "/",
  }
}

Keep pathPrefix: "/" for root hosting on StaticHost. A leftover GitHub Pages prefix will break CSS and links. Passthrough copies matter: if CSS is not copied, HTML publishes without styles—looks like a hosting bug, is a build config bug.

Common keys people miss: templateFormats, htmlTemplateEngine, and markdownTemplateEngine. Change them deliberately; a wrong engine produces empty layouts that “deploy fine” and read blank.

Build commands

npm ci
npx @11ty/eleventy
# or
npm run build
ls _site

Zip contents of _site (name may differ if you changed dir.output):

cd _site && zip -r ../eleventy-site.zip .
unzip -l ../eleventy-site.zip | head

Upload to StaticHost. Git-based deploys must already contain this tree; the host will not compile Nunjucks for you—git deploy a static site. Nesting guide: zip a static site without 404.

Worked example: docs-ish micro site

src/
  index.md
  docs/install.md
  css/site.css
  _includes/layout.njk

src/index.md:

---
layout: layout.njk
title: Home
---
Welcome. See [Install](/docs/install/).

Build and prove permalinks exist as files:

npx @11ty/eleventy
find _site -type f | head
cd _site && zip -r ../docs-site.zip .

Deploy, open HTTPS preview, follow the install link, hard-refresh. Because Eleventy emitted a real page, strict nginx is happy. If you later bolt a client router onto a layout for a search UI, that UI still cannot invent server paths—host a single-page application.

Pagination, tags, and 404s

Eleventy emits real pages for paginated collections and tags. Those URLs work on strict static hosting. Add a 404.md (or template) that outputs 404.html if you want a friendly missing-page document. That remains distinct from rewriting all routes to home—StaticHost will not do SPA-style rewrites.

Data and computed values

_data files and computed data run at build time on your machine. Secrets in _data become public if rendered into HTML. Treat build-time data as publishable. For draft workflow, use eleventyExcludeFromCollections and consider a Pro staging site ($30/mo) so draft URLs never share the production hostname.

When not to use Eleventy on StaticHost

  • You need server middleware from @11ty/eleventy-server in production.
  • Editors refuse Markdown/HTML and demand WordPress admin → PHP host.
  • You expected the host to watch files and rebuild on save.

Documentation sites often use Eleventy—pair with static documentation hosting. Compare generators: host a Hugo website.

Preview workflow

  1. Build; deploy _site contents.
  2. Open HTTPS preview (TLS without DNS wait).
  3. Click pagination “Next,” a tag page, and an image passthrough.
  4. Roll back on bad theme changes.
  5. Custom domain after DNS verification → certificate—static hosting with a custom domain.

Failure table (Eleventy)

SymptomLikely causeFix
HTML without CSSMissing addPassthroughCopyAdd passthrough; rebuild
Links start with /repo/pathPrefix leftoverSet pathPrefix: "/"; rebuild
Tag page 404Tag not in this build or wrong permalinkInspect _site/tags; fix templates
Draft visible in productionDeployed full tree including draftsExclude drafts; use staging
Empty layout bodyWrong template engine / missing layoutCheck front matter layout and engines

A realistic week shipping host an eleventy website

Monday starts with a broken relative CSS path that only appears once the files leave a designer’s laptop. You flatten the zip so index.html sits at the archive root, redeploy to StaticHost, and HTTPS preview finally matches local intent. StaticHost serves prebuilt files via zip or GitHub and does not run npm, Hugo, or Jekyll remotely.

Wednesday adds a custom domain. DNS is created exactly as the dashboard specifies; verification lags an hour; the certificate appears afterward. Someone asks whether email is included—you point them at a mail vendor and keep MX untouched. Deploy history supports rollback when a publish goes wrong.

Thursday an engineer enables history-mode routing for a “cleaner URL.” Refresh on a nested path 404s. You revert to hash routing for the week’s deadline and schedule prerender work properly instead of inventing an nginx rewrite StaticHost will not apply. Plans: Starter $9 (1 site, 2 GB), Pro $30 (3 sites, 10 GB, staging), Scale $65 (10 sites, 30 GB), Business $130 (30 sites, 100 GB, teams).

Friday staging on Pro receives a build with staging API URLs baked via public env prefixes. Production stays on last week’s known-good deploy until Monday’s review. Rollback remains one click if marketing’s late copy drop breaks mobile layout. Preview HTTPS is available immediately; custom-domain certificates issue only after DNS verifies.

There is a short trial (~1 day), not a forever-free tier; no cPanel, no email, no built-in CDN product.

That week is what host an eleventy website looks like when the host stays boring and the team respects file truth.

Extra procedure: collections and draft gates

When your blog collection grows:

  1. Keep drafts out of production with front matter exclusions or separate input sets.
  2. Build twice in CI mentality: staging includes drafts on a Pro staging site ($30); production excludes them.
  3. After npx @11ty/eleventy, assert tag pages and pagination directories exist under _site before zipping.
  4. Confirm addPassthroughCopy still covers css/ and images/ after refactors.
  5. Deploy; on HTTPS preview click “Next” on pagination and open a tag URL; hard-refresh.
  6. Roll back if a layout engine mistake empties bodies—empty layouts “deploy fine” and read blank.
  7. Custom domain after DNS verification; certificate follows. StaticHost will not watch files or rebuild on save.

pathPrefix stays / for root hosting. Leftover GitHub Pages prefixes break CSS the same way on every generator. Plans $9/$30/$65/$130; trial ~1 day; no forever-free, email, cPanel, or built-in CDN product.

FAQ

Does Eleventy need a database on StaticHost?

No. Content is built into files.

Can I use Eleventy server middleware in production here?

No. Watch/serve mode is local development. Production is static output only.

Why are passthrough files missing?

They were not configured with addPassthroughCopy, or you zipped before the build finished.

Is _site safe to commit?

Optional for deploy branches. Often gitignored in source branches; CI builds it.

How does this differ from Hugo hosting?

Same hosting shape; different generator. Hugo notes: host a Hugo website. JAMstack framing: JAMstack hosting for beginners.