Documentation — Table of Contents
CI/Publish Checklist
Ship consistent builds with correct URLs, clean output, and sensible sitemap/noindex handling in CI.
Prerequisites
- Baseline installed;
package.jsonscripts:dev(npx @11ty/eleventy --serve),build(npx @11ty/eleventy). site.urlcomes from env (e.g.,URL);pathPrefixset if you deploy under a subpath.- CI/host lets you set environment variables.
Steps
-
Set production URL (and path prefix) in CI.
- In your CI env vars:
URL=https://your-site.example. - If deploying under a subpath, also set
PATHPREFIX=/docs/and mirror that ineleventy.config.js(pathPrefix). - Don’t hardcode the origin in code; read from env.
- In your CI env vars:
-
Enforce clean builds.
- In CI, clear
dist/before building:npx rimraf dist npm run build - Cache
node_modulesif your CI supports it to speed up installs.
- In CI, clear
-
Control indexing for previews.
- For preview/staging deploys, set
PREVIEW=true(or similar) and gatenoindexvia data/computed data. - Optionally disable sitemap for previews or keep it if you need it; ensure
noindexis set so previews aren’t indexed.
- For preview/staging deploys, set
-
Validate outputs in CI.
- Check
dist/sitemap.xmluses the correct origin (andpathPrefixif set). - Spot-check a built page for
<link rel="canonical">and absolute social URLs. - If you have link checks, run them against
dist/.
- Check
-
Publish artifacts.
- Upload/deploy
dist/to your host (Netlify/Vercel/GitHub Pages, etc.). - For PR/previews, point
URL(or fallback env likeDEPLOY_URL) to the preview domain and keepnoindexon.
- Upload/deploy
Notes
- Keep
site.urlorigin-only; usepathPrefixfor subpaths. - Baseline’s sitemap/head use
URL+pathPrefix; incorrect envs leak wrong canonicals. - Pair with the “Deployment URL Checks” tutorial for the initial setup; this how-to focuses on CI enforcement.
Previous: Multilingual Index