Configuration
Options
Section titled “Options”includeFrontmatter
Section titled “includeFrontmatter”Type: boolean
Default: true
When set to true, the frontmatter of the page is included in the generated
markdown content.
starlightDotMd({ includeFrontmatter: false,});excludePatterns
Section titled “excludePatterns”Type: string[]
Default: []
An array of glob patterns to exclude pages from being served as .md files.
starlightDotMd({ excludePatterns: ["private/**", "**/draft-*"],});includePatterns
Section titled “includePatterns”Type: string[]
Default: []
An array of glob patterns to include pages for being served as .md files. When
specified, only pages matching these patterns will be served.
starlightDotMd({ includePatterns: ["guides/**"],});You can use includePatterns and excludePatterns together. Pages must match
includePatterns (if specified) and not match excludePatterns.
starlightDotMd({ includePatterns: ["guides/**"], excludePatterns: ["guides/internal/**"],});preserveExtension
Section titled “preserveExtension”Type: boolean
Default: false
When set to true, .mdx and .mdoc files are served with their original
extensions instead of being normalized to .md.
starlightDotMd({ preserveExtension: true,});With this option enabled:
.mdfiles are served at.mdURLs (e.g.,/guides/example.md).mdxfiles are served at.mdxURLs (e.g.,/index.mdx).mdocfiles are served at.mdocURLs (e.g.,/markdoc.mdoc)