From 192e49eb2b2f00199d1b738d0f6214ac6a2742d5 Mon Sep 17 00:00:00 2001 From: Catherine Deskur <46695336+chdeskur@users.noreply.github.com> Date: Thu, 26 Dec 2024 15:37:27 -0500 Subject: [PATCH] chore(docs): document layout property (#5490) * document layout * be more ambiguous * Update layout descriptions and SEO metadata text * Fix markdown formatting in front-matter.mdx * Fix layout options formatting in front-matter.mdx * Fix layout descriptions formatting in front-matter.mdx * fix frontmatter and rename page --------- Co-authored-by: fern-bot Co-authored-by: Danny Sheridan <83524670+dannysheridan@users.noreply.github.com> Co-authored-by: dannysheridan --- fern/docs.yml | 4 +-- .../{front-matter.mdx => frontmatter.mdx} | 25 ++++++++++++++++++- 2 files changed, 26 insertions(+), 3 deletions(-) rename fern/pages/fern-docs/content/{front-matter.mdx => frontmatter.mdx} (84%) diff --git a/fern/docs.yml b/fern/docs.yml index 90d95568172..c9f599a323b 100644 --- a/fern/docs.yml +++ b/fern/docs.yml @@ -452,7 +452,7 @@ navigation: slug: response-snippet - page: Frontmatter icon: fa-regular fa-sliders - path: ./pages/fern-docs/content/front-matter.mdx + path: ./pages/fern-docs/content/frontmatter.mdx - page: Reusable Snippets icon: fa-regular fa-recycle path: ./pages/fern-docs/content/reusable-snippets.mdx @@ -567,7 +567,7 @@ navigation: navbar-links: - type: minimal text: Slack community - url: https://join.slack.com/t/fern-community/shared_invite/zt-2q7ev4mki-mhO5anKslwRowp4oExWf4A + url: https://buildwithfern.com/slack - type: filled text: Book a demo url: https://buildwithfern.com/contact diff --git a/fern/pages/fern-docs/content/front-matter.mdx b/fern/pages/fern-docs/content/frontmatter.mdx similarity index 84% rename from fern/pages/fern-docs/content/front-matter.mdx rename to fern/pages/fern-docs/content/frontmatter.mdx index d22bc260b9b..a805219ee47 100644 --- a/fern/pages/fern-docs/content/front-matter.mdx +++ b/fern/pages/fern-docs/content/frontmatter.mdx @@ -153,6 +153,10 @@ Controls the conditional rendering of the table of contents feature on the right Table of contents feature + + By default, Fern will center the contents of a page when the table of contents is hidden. To control the layout of the page, see the [layout documentation](#layout). + + ## Navigation links **Name**: `hide-nav-links`
@@ -199,9 +203,28 @@ logo: This field specifies the logo for this page. If no logo is set, the site-wide [logo configuration](/learn/docs/getting-started/global-configuration#logo-configuration) is used. +## Layout + +**Name**: `layout`
+**Type**: `overview`, `guide`, `reference`, `page`, or `custom`
+**Default**: `guide` + +Sets the page layout. + +- `overview`: A spacious, full-width layout without a table of contents. Perfect for landing pages, section overviews, and content that benefits from maximum horizontal space. Navigation sidebar remains visible. + +- `guide`: The default documentation layout featuring a table of contents on the right side. Ideal for tutorials, how-to guides, and any content that benefits from easy navigation through sections. + +- `reference`: A full-width layout optimized for an API or SDK reference. Removes the table of contents so you can add another column, such as code examples. Navigation sidebar remains visible. + +- `page`: A distraction-free, full-screen layout that hides both the table of contents and navigation sidebar. Best for standalone content that benefits from focused reading experiences. + +- `custom`: A blank canvas layout that removes all default styling constraints. Hides both the table of contents and navigation sidebar, allowing complete control over the page layout. + ## SEO metadata -Fern also supports adding SEO-specific metadata in the frontmatter. +Fern supports adding SEO metadata in the frontmatter. + | Property | Description | Type | | -------- | ----------- | ---- |