Markdown Extensions
Starlight includes Expressive Code for syntax highlighting, filenames,
highlighted lines, diffs, and copy controls. This sample adds math processing
with remark-math, rehype-katex, and KaTeX.
Syntax highlighting
Section titled “Syntax highlighting”export function Profile({ user }) { const displayName = user.name ?? 'Anonymous'
return ( <article className="profile-card"> <h2>{displayName}</h2> <p>{user.role}</p> </article> )}export const theme = { primary: 'blue', primary: 'purple', radius: '0.75rem',}Footnote and math
Section titled “Footnote and math”Footnotes keep supporting detail near the source.1
Inline math such as and display math render through KaTeX:
Footnotes
Section titled “Footnotes”-
This is the rendered footnote definition. ↩