Agent Markdown
sentryAgentMarkdown() generates Markdown versions of Starlight docs pages and adds a Markdown copy action to the table of contents.
import starlight from "@astrojs/starlight";import sentryStarlightTheme, { monochromeCodeTheme, sentryAgentMarkdown,} from "@sentry/starlight-theme";import { defineConfig } from "astro/config";
export default defineConfig({ integrations: [ starlight({ title: "My Sentry project", plugins: [sentryStarlightTheme(), sentryAgentMarkdown()], }), ], markdown: { shikiConfig: { theme: monochromeCodeTheme, }, },});Options
Section titled “Options”markdownRoutesGenerate static
.mdroutes. Defaults totrue.markdownActionsAdd a Markdown copy action below the right-sidebar table of contents. Defaults to
true.navigationAppend child-page navigation to generated Markdown pages. Defaults to
true.contentNegotiationServe Markdown from normal docs URLs when SSR requests prefer Markdown. Defaults to
false.
sentryAgentMarkdown({ contentNegotiation: true, markdownActions: false,});Generated Routes
Section titled “Generated Routes”/index.mdfor the root docs page./<slug>.mdfor every other docs page.- Non-root pages get a
Navigationsection with docs-home and previous/next sibling links. - Nested pages also get a parent link.
- Pages with visible child pages also get a
Pages in this sectionlist. - Draft, hidden, and versioned pages are omitted from generated navigation.
Markdown Conversion Fixtures
Section titled “Markdown Conversion Fixtures”The sandbox includes rendered HTML patterns that should produce readable Markdown:
api-link-cardgrids become Markdown lists.sentry-key-value-listdefinition lists become compact bullet lists.- Expressive Code blocks preserve line breaks and language fences.
- Starlight heading anchors do not leak screen-reader labels into Markdown.