Skip to content

Installation

Astro Snapshot is available on both JSR and npm, so you can choose where you want to install it from. Either way, you get full type support.

You can use the Astro CLI to install and set up the integration automatically using your preferred package manager.

npx astro add @twocaretcat/astro-snapshot

If you run into any issues, you can install the package manually instead.

First, install the package using your preferred package manager.

npm install @twocaretcat/astro-snapshot
npx jsr add @twocaretcat/astro-snapshot

Then add it to your astro.config.*.

import { defineConfig } from 'astro/config';
import snapshot from '@twocaretcat/astro-snapshot';

export default defineConfig({
  integrations: [],
  integrations: [snapshot({ pages: {} })],
});

Next, you’ll need to configure some pages to screenshot.