Altair docs

Updating Altair

How to get new versions of Altair, and keep your content and changes safe while you update.

New versions of Altair are free for buyers. When one is released, download it again from the link in your Lemon Squeezy purchase email or from your Lemon Squeezy orders.

Before you update

Commit your project to Git, or make a copy of the folder. That way you can always go back.

If you only changed content and settings

This is the usual case. Your own work lives in a few places:

  • src/site.config.ts
  • src/content/projects/ and src/content/posts/
  • src/data/
  • src/assets/
  • public/
  • site and any font changes in astro.config.mjs
  1. Unzip the new version into a new folder.
  2. Copy those files and folders from your project into the new folder, replacing the samples.
  3. Run npm install, then npm run dev, and check that everything looks right.
  4. Read the release notes for that version. If a setting was added, npm run dev tells you which file needs it.

If you changed components or styles

Compare your files with the new version and copy your changes across by hand. A diff tool makes this easy. VS Code can compare two files: select both in the explorer, right-click and choose Compare Selected.

Updating Astro itself

Altair is tested with the Astro version in its package.json. Minor and patch updates are usually safe:

npx @astrojs/upgrade

After updating, run npm run check and npm run build. If something breaks, revert to your committed version and wait for the next Altair release, which will support the new Astro version.