Skip to main content
Docs Kit updates

Kit updates

A site takes a kit release with npm install, on a branch that deploys to the preview site. An update changes no file of the site except package.json, package-lock.json and two generated files: the CMS config, public/admin/config.yml, and the description of the site's content, .hostsmith/schema.json.

Take a release

The releases list each release and its notes. To take v0.7.0:

git switch -c kit-update/v0.7.0
npm install --save-exact @hostsmith/site-kit-astro@0.7.0
npm run decap-config
npx site-kit schema
npm run check:styles
npm run build
npm run check:urls
npm run check:styles -- --built

Then commit, push the branch, check the preview site, and merge the branch to main.

  • If npm reports a conflict on astro, the release notes name the astro version to install with the kit, in the same command.
  • A site without .hostsmith/schema.json gains it at the first update that runs npx site-kit schema: commit it too.

What the checks report

  • check:styles checks the site's theme against the new release's styling hooks. It fails on a hook the release no longer has, and warns about one it deprecates, naming the replacement. Rename the selector in the theme or site.css.
  • check:styles -- --built warns about hooks the built pages carry that the theme doesn't style yet, such as a new variant. Style them in the theme.
  • The build warns about content that a release deprecates, naming the replacement.

A hook is deprecated in one release before a later one removes it. A site that clears the warnings at each update takes the removal without surprises.

Releases that change a site's files

The kit is before 1.0, so a release can still change what a site's files hold, as 0.5 and 0.6 did. Such a release's notes give the steps, and the kit's README has a checklist for it, such as From 0.5 to 0.6. For a site that skipped the release that deprecated a hook, the notes of the release that removes it, and the errors from check:styles, list what to change.

The README's Kit updates has the same commands.