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
pnpm astro add @twocaretcat/astro-snapshot
yarn astro add @twocaretcat/astro-snapshot
bunx astro add @twocaretcat/astro-snapshot
deno run -A astro add @twocaretcat/astro-snapshot
vlt 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
npm install @twocaretcat/astro-snapshot
JSR
npx jsr add @twocaretcat/astro-snapshot
npm
pnpm add @twocaretcat/astro-snapshot
JSR
pnpm i jsr:@twocaretcat/astro-snapshot
npm
yarn add @twocaretcat/astro-snapshot
JSR
yarn add jsr:@twocaretcat/astro-snapshot
npm
bun add @twocaretcat/astro-snapshot
JSR
bunx jsr add @twocaretcat/astro-snapshot
npm
deno add npm:@twocaretcat/astro-snapshot
JSR (recommended)
deno add jsr:@twocaretcat/astro-snapshot
npm
vlt install @twocaretcat/astro-snapshot
JSR
vlt install jsr:@twocaretcat/astro-snapshot
Then add it to your astro.config.*.
astro.config.ts
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.