Skip to content

Getting started

Getting started

This page walks through the two-file change that takes a vanilla Starlight site to a Starlight site that also publishes an ACT tree.

Install

Terminal window
pnpm add @act-spec/plugin-astro @act-spec/adapter-markdown

Wire it up

Add the ACT integration after the Starlight integration in astro.config.mjs:

import { defineConfig } from 'astro/config';
import starlight from '@astrojs/starlight';
import act from '@act-spec/plugin-astro';
import { createMarkdownAdapter } from '@act-spec/adapter-markdown';
export default defineConfig({
site: 'https://your-site.example',
integrations: [
starlight({ title: 'Your Docs' }),
act({
level: 'standard',
site: { name: 'Your Docs' },
adapters: [
{
adapter: createMarkdownAdapter(),
config: { sourceDir: './src/content/docs', mode: 'fine', targetLevel: 'standard' },
actVersion: '0.1',
},
],
}),
],
});

Build

Terminal window
pnpm build

dist/ now contains both the Starlight HTML site and the ACT artifact set under dist/.well-known/ and dist/act/.

Move on to Configuration for the full option surface.