Skip to content

Configuration

The Starlight Auto Drafts plugin can be configured inside the astro.config.mjs configuration file of your project:

astro.config.mjs
// @ts-check
import starlight from '@astrojs/starlight'
import { defineConfig } from 'astro/config'
import starlightAutoDrafts from 'starlight-auto-drafts'
export default defineConfig({
integrations: [
starlight({
plugins: [
starlightAutoDrafts({
// Configuration options go here.
}),
],
title: 'My Docs',
}),
],
})

The Starlight Auto Drafts plugin accepts the following configuration options:

type: { badges?: boolean }
default: true

Configure Starlight Auto Drafts highlights for draft pages in the sidebar in development mode. By default, draft pages are highlighted with an italicized label and a badge.

To learn more about highlights, check out the “Custom Highlights” guide.

type: boolean
default: true

Controls whether or not badges are added to draft pages in the sidebar in development mode. If a draft page already has a badge, it will not be overridden by the plugin.

starlightAutoDrafts({
highlights: {
// Disable badges for draft pages in the sidebar.
badges: false,
},
})