From 781509aa05ac992058727c76091719f364661f0a Mon Sep 17 00:00:00 2001 From: Devin Logan Date: Tue, 23 Sep 2025 15:11:01 -0400 Subject: [PATCH 1/3] update title and code highlighting --- .../custom-components/reusable-markdown.mdx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fern/products/docs/pages/component-library/custom-components/reusable-markdown.mdx b/fern/products/docs/pages/component-library/custom-components/reusable-markdown.mdx index 2ef5ae02e..490a0115d 100644 --- a/fern/products/docs/pages/component-library/custom-components/reusable-markdown.mdx +++ b/fern/products/docs/pages/component-library/custom-components/reusable-markdown.mdx @@ -1,17 +1,17 @@ --- -title: Reusable Markdown -description: Reusable, custom markdown to keep content in sync. Edit once, update everywhere. +title: Reusable snippets +description: Reusable, custom markdown snippets to keep content in sync. Edit once, update everywhere. --- -Keep your documentation DRY (Don't Repeat Yourself) by defining a reusable snippet once, and then referencing it in multiple places. This way, you only need to update the snippet in one place to keep all references in sync. +Keep your documentation DRY (Don't Repeat Yourself) by defining a reusable Markdown snippet once, and then referencing it in multiple places. This way, you only need to update the snippet in one place to keep all references in sync. ## Create a reusable snippet -To use reusable snippets, start by creating a new folder in your `fern` project called `snippets`. Inside the `snippets` folder, create a new file for each snippet you want to define. +To use reusable snippets, start by creating a new folder in your `fern` project called `snippets`. Inside the `snippets` folder, create a new Markdown file for each snippet you want to define. For example: -```bash +```bash {3, 6-8} fern └─ pages └─ my-tutorial.mdx From 0b0ea2fd6d5a436d8794ec2bab82efca0a2b7e53 Mon Sep 17 00:00:00 2001 From: Devin Logan Date: Tue, 23 Sep 2025 16:20:19 -0400 Subject: [PATCH 2/3] add info about using snippets for constants --- .../custom-components/custom-react-components.mdx | 6 ++++-- .../custom-components/reusable-markdown.mdx | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/fern/products/docs/pages/component-library/custom-components/custom-react-components.mdx b/fern/products/docs/pages/component-library/custom-components/custom-react-components.mdx index 2c2e9fa2b..d0f8df1f7 100644 --- a/fern/products/docs/pages/component-library/custom-components/custom-react-components.mdx +++ b/fern/products/docs/pages/component-library/custom-components/custom-react-components.mdx @@ -3,12 +3,14 @@ title: Custom React Components subtitle: Add your own React components to enhance your docs --- + + You can extend Fern's built-in component library by adding your own custom React components. This allows you to create unique, interactive elements that match your documentation needs. -Setting up custom react components is part of the pro plan. +Don't use a React component to define a constant. Instead, consider using [reusable snippets](/docs/writing-content/reusable-markdown). -## How does it work +## How does it work? ### Create a React component diff --git a/fern/products/docs/pages/component-library/custom-components/reusable-markdown.mdx b/fern/products/docs/pages/component-library/custom-components/reusable-markdown.mdx index 490a0115d..42ca5a9d0 100644 --- a/fern/products/docs/pages/component-library/custom-components/reusable-markdown.mdx +++ b/fern/products/docs/pages/component-library/custom-components/reusable-markdown.mdx @@ -5,6 +5,8 @@ description: Reusable, custom markdown snippets to keep content in sync. Edit on Keep your documentation DRY (Don't Repeat Yourself) by defining a reusable Markdown snippet once, and then referencing it in multiple places. This way, you only need to update the snippet in one place to keep all references in sync. +Reusable snippets work well for constants (API limits, subscription prices, version numbers), repeated warnings or notes, and standardized formatting blocks. + ## Create a reusable snippet To use reusable snippets, start by creating a new folder in your `fern` project called `snippets`. Inside the `snippets` folder, create a new Markdown file for each snippet you want to define. From 0a6309375095be75094ae7e511b041bb4ddf21e5 Mon Sep 17 00:00:00 2001 From: Devin Logan Date: Tue, 23 Sep 2025 16:21:37 -0400 Subject: [PATCH 3/3] note formatting --- .../custom-components/custom-react-components.mdx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fern/products/docs/pages/component-library/custom-components/custom-react-components.mdx b/fern/products/docs/pages/component-library/custom-components/custom-react-components.mdx index d0f8df1f7..1c1374fc6 100644 --- a/fern/products/docs/pages/component-library/custom-components/custom-react-components.mdx +++ b/fern/products/docs/pages/component-library/custom-components/custom-react-components.mdx @@ -8,7 +8,9 @@ subtitle: Add your own React components to enhance your docs You can extend Fern's built-in component library by adding your own custom React components. This allows you to create unique, interactive elements that match your documentation needs. -Don't use a React component to define a constant. Instead, consider using [reusable snippets](/docs/writing-content/reusable-markdown). + + Don't use a React component to define a constant. Instead, consider using [reusable snippets](/docs/writing-content/reusable-markdown). + ## How does it work?