Eleventy Plugin Baseline

A magic carpet ride

Documentation — Table of Contents

CI/Publish Checklist

Ship consistent builds with correct URLs, clean output, and sensible sitemap/noindex handling in CI.

Prerequisites

Steps

  1. 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 in eleventy.config.js (pathPrefix).
    • Don’t hardcode the origin in code; read from env.
  2. Enforce clean builds.

    • In CI, clear dist/ before building:
      npx rimraf dist
      npm run build
    • Cache node_modules if your CI supports it to speed up installs.
  3. Control indexing for previews.

    • For preview/staging deploys, set PREVIEW=true (or similar) and gate noindex via data/computed data.
    • Optionally disable sitemap for previews or keep it if you need it; ensure noindex is set so previews aren’t indexed.
  4. Validate outputs in CI.

    • Check dist/sitemap.xml uses the correct origin (and pathPrefix if set).
    • Spot-check a built page for <link rel="canonical"> and absolute social URLs.
    • If you have link checks, run them against dist/.
  5. Publish artifacts.

    • Upload/deploy dist/ to your host (Netlify/Vercel/GitHub Pages, etc.).
    • For PR/previews, point URL (or fallback env like DEPLOY_URL) to the preview domain and keep noindex on.

Notes

Previous: Multilingual Index

Next: Integrate Baseline with Eleventy Base Blog