diff options
author | Chris Swithinbank | 2023-05-23 16:54:12 +0200 |
---|---|---|
committer | Chris Swithinbank | 2023-05-23 16:54:12 +0200 |
commit | 2117927552f0e7677759a5a159b066b2cdd6941a (patch) | |
tree | 7b7364617816d2c6a825dd7497ed8d25b2bd7344 | |
parent | 6ae33c48055588e288a94df59d4824ea375e3e75 (diff) | |
download | IT.starlight-2117927552f0e7677759a5a159b066b2cdd6941a.tar.gz IT.starlight-2117927552f0e7677759a5a159b066b2cdd6941a.tar.bz2 IT.starlight-2117927552f0e7677759a5a159b066b2cdd6941a.zip |
Add frontmatter reference page
-rw-r--r-- | docs/src/content/docs/reference/frontmatter.md | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/docs/src/content/docs/reference/frontmatter.md b/docs/src/content/docs/reference/frontmatter.md new file mode 100644 index 00000000..cdd2279a --- /dev/null +++ b/docs/src/content/docs/reference/frontmatter.md @@ -0,0 +1,51 @@ +--- +title: Frontmatter Reference +description: An overview of the default frontmatter fields Starlight supports. +--- + +You can customize individual Markdown and MDX pages in Starlight by setting values in their frontmatter. For example, a regular page might set `title` and `description` fields: + +```md +--- +title: About this project +description: Learn more about the project I’m working on. +--- + +Welcome to the about page! +``` + +## Frontmatter fields + +### `title` (required) + +**type:** `string` + +You must provide a title for every page. This will be displayed at the top of the page, in browser tabs, and in page metadata. + +### `description` + +**type:** `string` + +The page description is used for page metadata and will be picked up by search engines and in social media previews. + +### `editUrl` + +**type:** `string | boolean` + +Overrides the [global `editLink` config](/reference/configuration/#editlink). Set to `false` to disable the “Edit page” link for a specific page or provide an alternative URL where the content of this page is editable. + +### `head` + +**type:** [`HeadConfig[]`](/reference/configuration/#headconfig) + +You can add additional tags to your page’s `<head>` using the `head` frontmatter field. This means you can add custom styles, metadata or other tags to a single page. Similar to the [global `head` option](/reference/configuration/#head). + +```md +--- +title: About us +head: + # Use a custom <title> tag + - tag: title + content: Custom about title +--- +``` |