From 60ec37e944cd6d6002d953d7828154778bb17d7c Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Tue, 4 Nov 2025 19:17:33 +0000 Subject: [PATCH 1/5] docs: add supported syntax highlighting languages for custom code samples Co-Authored-By: Chris McDonnell --- .../openapi-pages/extensions/examples.mdx | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/fern/products/api-def/openapi-pages/extensions/examples.mdx b/fern/products/api-def/openapi-pages/extensions/examples.mdx index 69bacbcd5..35d1dcb07 100644 --- a/fern/products/api-def/openapi-pages/extensions/examples.mdx +++ b/fern/products/api-def/openapi-pages/extensions/examples.mdx @@ -68,3 +68,20 @@ paths: client.users.get("user-1234") ``` + +#### Supported languages + +Fern supports syntax highlighting for the following languages in custom code samples: + +- `curl` +- `python` +- `javascript` (aliases: `js`, `node`) +- `typescript` (aliases: `ts`) +- `go` +- `ruby` +- `csharp` +- `php` +- `swift` +- `rust` + +If you specify a language that is not in this list, Fern will still display the code sample but without syntax highlighting. From d7ec961da0d1942f4ff2c54442e676e7b7657cc5 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Tue, 4 Nov 2025 19:20:13 +0000 Subject: [PATCH 2/5] fix: use contraction to address Vale style check Co-Authored-By: Chris McDonnell --- fern/products/api-def/openapi-pages/extensions/examples.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fern/products/api-def/openapi-pages/extensions/examples.mdx b/fern/products/api-def/openapi-pages/extensions/examples.mdx index 35d1dcb07..0b0019b32 100644 --- a/fern/products/api-def/openapi-pages/extensions/examples.mdx +++ b/fern/products/api-def/openapi-pages/extensions/examples.mdx @@ -84,4 +84,4 @@ Fern supports syntax highlighting for the following languages in custom code sam - `swift` - `rust` -If you specify a language that is not in this list, Fern will still display the code sample but without syntax highlighting. +If you specify a language that's not in this list, Fern will still display the code sample but without syntax highlighting. From f8a0070d64bdd7c9ec3c3ddbd1488e52dfb1815f Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Tue, 4 Nov 2025 19:26:21 +0000 Subject: [PATCH 3/5] fix: move supported languages documentation to code blocks page Co-Authored-By: Chris McDonnell --- .../openapi-pages/extensions/examples.mdx | 17 ----------------- .../default-components/code-blocks.mdx | 17 +++++++++++++++++ 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/fern/products/api-def/openapi-pages/extensions/examples.mdx b/fern/products/api-def/openapi-pages/extensions/examples.mdx index 0b0019b32..69bacbcd5 100644 --- a/fern/products/api-def/openapi-pages/extensions/examples.mdx +++ b/fern/products/api-def/openapi-pages/extensions/examples.mdx @@ -68,20 +68,3 @@ paths: client.users.get("user-1234") ``` - -#### Supported languages - -Fern supports syntax highlighting for the following languages in custom code samples: - -- `curl` -- `python` -- `javascript` (aliases: `js`, `node`) -- `typescript` (aliases: `ts`) -- `go` -- `ruby` -- `csharp` -- `php` -- `swift` -- `rust` - -If you specify a language that's not in this list, Fern will still display the code sample but without syntax highlighting. diff --git a/fern/products/docs/pages/component-library/default-components/code-blocks.mdx b/fern/products/docs/pages/component-library/default-components/code-blocks.mdx index e14ce4df8..cb1aa56a3 100644 --- a/fern/products/docs/pages/component-library/default-components/code-blocks.mdx +++ b/fern/products/docs/pages/component-library/default-components/code-blocks.mdx @@ -22,6 +22,23 @@ console.log("hello world") ``` ```` +## Supported languages + +Fern supports syntax highlighting for the following languages in code blocks: + +- `curl` +- `python` +- `javascript` (aliases: `js`, `node`) +- `typescript` (aliases: `ts`) +- `go` +- `ruby` +- `csharp` +- `php` +- `swift` +- `rust` + +If you specify a language that's not in this list, Fern will still display the code block but without syntax highlighting. + ## Variants ### Titles From 5569ef2919f2a429f8821c263f7eeb200df9fbc5 Mon Sep 17 00:00:00 2001 From: Devin Logan Date: Tue, 4 Nov 2025 15:51:23 -0500 Subject: [PATCH 4/5] move supported lang into callout --- .../default-components/code-blocks.mdx | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/fern/products/docs/pages/component-library/default-components/code-blocks.mdx b/fern/products/docs/pages/component-library/default-components/code-blocks.mdx index cb1aa56a3..13c289663 100644 --- a/fern/products/docs/pages/component-library/default-components/code-blocks.mdx +++ b/fern/products/docs/pages/component-library/default-components/code-blocks.mdx @@ -4,7 +4,24 @@ description: 'Learn how to enhance your documentation with customizable code blo max-toc-depth: 2 --- -The `` component displays code examples with syntax highlighting powered by [Shiki](https://shiki.matsu.io/). Code blocks support line highlighting, focusing, titles, and deep linking to make your code examples more readable and interactive. +The `` component displays code examples with syntax highlighting. Code blocks support line highlighting, focusing, titles, and deep linking to make your code examples more readable and interactive. + + + Fern supports [Shiki](https://shiki.matsu.io/) syntax highlighting for the following languages: + + - `curl` + - `python` + - `javascript` (aliases: `js`, `node`) + - `typescript` (aliases: `ts`) + - `go` + - `ruby` + - `csharp` + - `php` + - `swift` + - `rust` + + If you specify a language that's not on this list, Fern will still display the code block but without syntax highlighting. + ## Usage @@ -22,23 +39,6 @@ console.log("hello world") ``` ```` -## Supported languages - -Fern supports syntax highlighting for the following languages in code blocks: - -- `curl` -- `python` -- `javascript` (aliases: `js`, `node`) -- `typescript` (aliases: `ts`) -- `go` -- `ruby` -- `csharp` -- `php` -- `swift` -- `rust` - -If you specify a language that's not in this list, Fern will still display the code block but without syntax highlighting. - ## Variants ### Titles From 9b95933f96f7f8e7848fcc2b251d7937a563e22a Mon Sep 17 00:00:00 2001 From: Devin Logan Date: Tue, 4 Nov 2025 15:56:52 -0500 Subject: [PATCH 5/5] fix callout --- .../component-library/default-components/code-blocks.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fern/products/docs/pages/component-library/default-components/code-blocks.mdx b/fern/products/docs/pages/component-library/default-components/code-blocks.mdx index 13c289663..3d584b20e 100644 --- a/fern/products/docs/pages/component-library/default-components/code-blocks.mdx +++ b/fern/products/docs/pages/component-library/default-components/code-blocks.mdx @@ -6,7 +6,7 @@ max-toc-depth: 2 The `` component displays code examples with syntax highlighting. Code blocks support line highlighting, focusing, titles, and deep linking to make your code examples more readable and interactive. - + Fern supports [Shiki](https://shiki.matsu.io/) syntax highlighting for the following languages: - `curl` @@ -21,7 +21,7 @@ The `` component displays code examples with syntax highlighting. Cod - `rust` If you specify a language that's not on this list, Fern will still display the code block but without syntax highlighting. - + ## Usage