Table of Contents
Page 2 of 10

Eleventy Excellent

Add the usual suspects to .gitignore

Before anything else happens. Ignore rules first means your notes are covered before you take the first one, and a personal global gitignore cannot swallow a source file you are about to write. dist is already ignored by the starter, so this is temp/ and two negations:

# Usual suspects
temp/
!/src/content/tags/
!/src/assets/css/local/

The two negations matter here. tags and local are common global-gitignore entries, tags because that is what ctags writes, and both are real source directories in this project.

Pin Baseline to latest

The peer ranges line up with what the starter already pins, so nothing needs forcing.

npm install @apleasantview/eleventy-plugin-baseline --save-exact
npm approve-scripts --all

Two things npm will not tell you. Baseline pins esbuild exactly, so npm nests a second copy rather than deduping with the starter's, and cssnano brings a second PostCSS stack the same way. And if you use allowScripts, check it afterwards: npm approve-scripts --all drops the starter's own esbuild as stale and approves Baseline's nested copy.

Add the helper package and rewrite the scripts

One dependency to add, then the scripts get Baseline's shape.

npm install npm-run-all --save-dev

npm-run-all is what lets start and build chain clean in front of the Eleventy run, so a build is always a clean build:

{
  "clean": "rimraf dist/ src/_includes/css src/_includes/scripts",
  "clean:og": "rimraf src/assets/og-images",
  "dev:11ty": "cross-env ELEVENTY_ENV=development eleventy --serve",
  "build:11ty": "cross-env ELEVENTY_ENV=production eleventy",
  "start": "npm-run-all clean dev:11ty",
  "build": "npm-run-all clean build:11ty",
  "dryrun": "eleventy --dryrun"
}

clean still names the old pipeline's output directories, and clean:og still exists. Both go in the last part, once the things that wrote to them are gone.