From 4b81f6e18c7005df543733fd966653873d53d282 Mon Sep 17 00:00:00 2001 From: Jan Piotrowski Date: Wed, 14 Jun 2023 20:36:02 +0200 Subject: [PATCH 1/3] feat(frontmatter): Document required vs. optional frontmatter --- .../30-docs-components/03-frontmatter.mdx | 32 ++++++++++++------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/content/600-about/200-prisma-docs/30-docs-components/03-frontmatter.mdx b/content/600-about/200-prisma-docs/30-docs-components/03-frontmatter.mdx index 54850c53e4..3e9b43fa22 100644 --- a/content/600-about/200-prisma-docs/30-docs-components/03-frontmatter.mdx +++ b/content/600-about/200-prisma-docs/30-docs-components/03-frontmatter.mdx @@ -6,7 +6,9 @@ search: false -## title +## Required + +### title The `

` title of the page. This title appears at the top of the page, and in the left-hand navigation. @@ -17,7 +19,7 @@ Note: - You can wrap the `title` text in single quotes, but this is not mandatory. - If you wrap the `title` text in single quotes, then you cannot include apostrophes in the text. -## metaTitle +### metaTitle The `` of the page - falls back to `title` (`h1`). @@ -30,11 +32,13 @@ Note: - You can wrap the `metaTitle` text in single quotes, but this is not mandatory. - If you wrap the `metaTitle` text in single quotes, then you cannot include apostrophes in the text. -## <inlinecode>navTitle</inlinecode> +## Optional + +### <inlinecode>navTitle</inlinecode> Specifies a different, usually shorter title for the left-hand navigation. -## <inlinecode>metaDescription</inlinecode> +### <inlinecode>metaDescription</inlinecode> The `<meta name="description" content="" />` of the page. @@ -43,21 +47,23 @@ Note: - You can wrap the `metaDescription` text in single quotes, but this is not mandatory. - If you wrap the `metaDescription` text in single quotes, then you cannot include apostrophes in the text. -## <inlinecode>staticLink</inlinecode> +### <inlinecode>staticLink</inlinecode> Accepts `true` or `false` (defaults to `false`). If `true`, this option turns the page into a heading in the left-hand navigation. This heading cannot be clicked by the docs user. For example: https://www.prisma.io/docs/concepts/overview -> **Note**: The page still exists, but docs users can only navigate to it with the breadcrumb trail. We recommend that you add a [subsections](/about/prisma-docs/docs-components/mdx-examples#subsections) MDX component to the page, so that it contains useful content when a user navigates to it with the breadcrumb trail. +Note: + +- The page still exists, but docs users can only navigate to it with the breadcrumb trail. We recommend that you add a [subsections](/about/prisma-docs/docs-components/mdx-examples#subsections) MDX component to the page, so that it contains useful content when a user navigates to it with the breadcrumb trail. -## <inlinecode>preview</inlinecode> +### <inlinecode>preview</inlinecode> Accepts `true` or `false` (defaults to `false`). Adds a `preview` label to a page in the left-hand navigation. -## <inlinecode>toc</inlinecode> +### <inlinecode>toc</inlinecode> Enable or disable table of contents navigation on the page (defaults to `false`). For example: @@ -65,7 +71,11 @@ Enable or disable table of contents navigation on the page (defaults to `false`) toc: true ``` -## <inlinecode>tocDepth</inlinecode> +Note: + +- Requires to also customize `tocDepth` to have any visible effect. + +### <inlinecode>tocDepth</inlinecode> Controls the depth of headings to show in the in-page ToC: @@ -75,7 +85,7 @@ tocDepth: 2 > **Note**: Currently defaults up to level - `h2` -## <inlinecode>hidePage</inlinecode> +### <inlinecode>hidePage</inlinecode> Accepts `true` or `false` (defaults to `false`). @@ -90,7 +100,7 @@ Note: - A page hidden with `hidePage` is not listed by the [subsections](/about/prisma-docs/docs-components/mdx-examples#subsections) MDX component. - A page hidden with `hidePage` is still findable by docs users with a search. To omit a page from the search results, use the [`search`](#search) tag. -## <inlinecode>search</inlinecode> +### <inlinecode>search</inlinecode> Accepts `true` or `false` (defaults to `true`). From 95720679f24320619392900571c0e608ec5d7f00 Mon Sep 17 00:00:00 2001 From: Jan Piotrowski <piotrowski+github@gmail.com> Date: Wed, 14 Jun 2023 20:46:05 +0200 Subject: [PATCH 2/3] Update 03-frontmatter.mdx --- .../200-prisma-docs/30-docs-components/03-frontmatter.mdx | 1 + 1 file changed, 1 insertion(+) diff --git a/content/600-about/200-prisma-docs/30-docs-components/03-frontmatter.mdx b/content/600-about/200-prisma-docs/30-docs-components/03-frontmatter.mdx index 3e9b43fa22..aa88f6b3e5 100644 --- a/content/600-about/200-prisma-docs/30-docs-components/03-frontmatter.mdx +++ b/content/600-about/200-prisma-docs/30-docs-components/03-frontmatter.mdx @@ -2,6 +2,7 @@ title: Front matter metaDescription: Supported front matter variables. search: false +tocDepth: 3 --- <TopBlock></TopBlock> From fd4485c9c0cde5bd2e8a2e5b5e2e8b02b436895c Mon Sep 17 00:00:00 2001 From: Jan Piotrowski <piotrowski+github@gmail.com> Date: Thu, 15 Jun 2023 10:30:53 +0200 Subject: [PATCH 3/3] Update content/600-about/200-prisma-docs/30-docs-components/03-frontmatter.mdx --- .../200-prisma-docs/30-docs-components/03-frontmatter.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/600-about/200-prisma-docs/30-docs-components/03-frontmatter.mdx b/content/600-about/200-prisma-docs/30-docs-components/03-frontmatter.mdx index aa88f6b3e5..58a5eaa110 100644 --- a/content/600-about/200-prisma-docs/30-docs-components/03-frontmatter.mdx +++ b/content/600-about/200-prisma-docs/30-docs-components/03-frontmatter.mdx @@ -66,7 +66,7 @@ Adds a `preview` label to a page in the left-hand navigation. ### <inlinecode>toc</inlinecode> -Enable or disable table of contents navigation on the page (defaults to `false`). For example: +Enable or disable table of contents navigation on the page (defaults to `true`). For example: ``` toc: true