'use client' import { IntegrationGuide } from '@/components/IntegrationGuide' import { CodeBlock } from '@/components/CodeBlock' import { getIntegration } from '@/lib/integrations' import { notFound } from 'next/navigation' export default function AstroIntegrationPage() { const integration = getIntegration('astro') if (!integration) return notFound() return (

Astro makes it easy to add third-party scripts. Drop the Pulse snippet into your base layout and you're done.


Base Layout (Recommended)

Add the script to the <head> of your base layout file so it loads on every page.

{`--- // Base layout used by all pages --- My Astro Site `}

Using Astro's Script Integration

You can also configure the script in your astro.config.mjs using the injectScript API of an Astro integration, but the layout approach above is simpler for most projects.

Astro + View Transitions

If you use Astro's View Transitions, the Pulse script persists across navigations automatically since it is loaded in the <head> with defer.

) }