Install Foresite on Starlight
Starlight adds tags to every page's <head> from its head option. In astro.config.mjs:
import { defineConfig } from 'astro/config'
import starlight from '@astrojs/starlight'
export default defineConfig({
integrations: [
starlight({
title: 'My Docs',
head: [
{
tag: 'script',
attrs: { src: 'https://t.foresite.dev/s/YOUR_SITE_ID.js', defer: true },
},
],
}),
],
})
Use the address from your own Foresite line (Settings → Install), then deploy. Visits to localhost aren't counted, so test on your published docs: the Installation Check in Settings → Install turns green with the first pageview.