Skip to content

astro-snapshot

Astro integration for generating automated page snapshots using Puppeteer.

This module provides an integration that runs after the build process, starts a local static file server, and captures screenshots for configured routes using a headless browser.

See the documentation for more information.

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

export default defineConfig({
  integrations: [
    snapshot({
      pages: {
        '/': [{ outputPath: 'src/assets/og.png' }],
      },
    }),
  ],
});