Frontmatter
By default, the Starlight TypeDoc plugin generates documentation pages which include a frontmatter with various fields already set like the title of the page.
Customize the frontmatter
Using the typedoc-plugin-frontmatter
plugin, you can customize the frontmatter of the generated documentation pages using a custom TypeDoc plugin.
-
Install the
typedoc-plugin-frontmatter
plugin using your favorite package manager: -
Create a custom TypeDoc plugin to customize the frontmatter of the generated documentation pages.
The following example customizes the frontmatter of the
variables/something.md
page to include a sidebarbadge
with the text “New”: -
Edit the Starlight TypeDoc plugin configuration in your
astro.config.mjs
file to include thetypedoc-plugin-frontmatter
plugin and the custom one you created in the previous step using thetypeDoc
option:
To learn more about the typedoc-plugin-frontmatter
plugin, check out the documentation.