From d29b95dbf8ac858492b978fc42a8c46b105d5bbd Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Mon, 11 May 2026 15:53:42 +0000 Subject: [PATCH 1/3] Document cross-link feature in library docs generator --- .../docs/pages/api-references/library-docs.mdx | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/fern/products/docs/pages/api-references/library-docs.mdx b/fern/products/docs/pages/api-references/library-docs.mdx index e00a59ce9..d4a269278 100644 --- a/fern/products/docs/pages/api-references/library-docs.mdx +++ b/fern/products/docs/pages/api-references/library-docs.mdx @@ -113,6 +113,23 @@ navigation: ``` +## Cross-links in code blocks + +When a fully-qualified identifier from your library appears inside a code block — for example, in a class signature or a type annotation — the generator turns it into a hyperlink to the page documenting that symbol. Readers can jump from a signature directly to the definition of any referenced class, module, or type without leaving the API reference. + +For example, on the [`benchling_sdk.apps.canvas.framework` page of the Benchling SDK docs](https://benchling.ferndocs.com/docs/benchling-sdk/benchling_sdk/apps/canvas/framework#api), the constructor for `CanvasBuilder` references `benchling_sdk.apps.canvas.types.UiBlock` in its `blocks` parameter: + +```python +class benchling_sdk.apps.canvas.framework.CanvasBuilder( + blocks: typing.Optional[typing.List[benchling_sdk.apps.canvas.types.UiBlock]] = None, + ... +) +``` + +Because `UiBlock` is defined elsewhere in the same library, the generator renders it as a link to the `UiBlock` reference page. + +Cross-links are generated automatically — no configuration required. + ## Customize generated docs (optional) You can reorganize the output directory to restructure the sidebar navigation. Move, rename, or nest files and subfolders, and Fern picks up the new layout on the next `fern docs dev` or publish. From 0211b1a6ce903dee0f7412c7a56a878313a2c43e Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Mon, 11 May 2026 17:18:32 +0000 Subject: [PATCH 2/3] Condense cross-link mention into intro and fix Vale issues --- .../pages/api-references/library-docs.mdx | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/fern/products/docs/pages/api-references/library-docs.mdx b/fern/products/docs/pages/api-references/library-docs.mdx index d4a269278..d24404cc4 100644 --- a/fern/products/docs/pages/api-references/library-docs.mdx +++ b/fern/products/docs/pages/api-references/library-docs.mdx @@ -4,7 +4,7 @@ description: Generate MDX documentation pages from your Python or C++ library so --- -The library docs generator parses your **Python or C++** library source code and generates MDX documentation pages for modules, classes, functions, methods, and parameters. Generated pages include cross-reference links and hierarchical navigation, and are integrated directly into your Fern Docs site. +The library docs generator parses your **Python or C++** library source code and generates MDX documentation pages for modules, classes, functions, methods, and parameters. Generated pages are integrated directly into your Fern Docs site with hierarchical navigation and automatic cross-links: when a fully qualified identifier from your library appears in a code block, the generator renders it as a hyperlink to the page documenting that symbol. ## Configuration @@ -113,23 +113,6 @@ navigation: ``` -## Cross-links in code blocks - -When a fully-qualified identifier from your library appears inside a code block — for example, in a class signature or a type annotation — the generator turns it into a hyperlink to the page documenting that symbol. Readers can jump from a signature directly to the definition of any referenced class, module, or type without leaving the API reference. - -For example, on the [`benchling_sdk.apps.canvas.framework` page of the Benchling SDK docs](https://benchling.ferndocs.com/docs/benchling-sdk/benchling_sdk/apps/canvas/framework#api), the constructor for `CanvasBuilder` references `benchling_sdk.apps.canvas.types.UiBlock` in its `blocks` parameter: - -```python -class benchling_sdk.apps.canvas.framework.CanvasBuilder( - blocks: typing.Optional[typing.List[benchling_sdk.apps.canvas.types.UiBlock]] = None, - ... -) -``` - -Because `UiBlock` is defined elsewhere in the same library, the generator renders it as a link to the `UiBlock` reference page. - -Cross-links are generated automatically — no configuration required. - ## Customize generated docs (optional) You can reorganize the output directory to restructure the sidebar navigation. Move, rename, or nest files and subfolders, and Fern picks up the new layout on the next `fern docs dev` or publish. From 79bb14fac922d756ed29c3aa525d7fe6d7856fa1 Mon Sep 17 00:00:00 2001 From: Devin Logan Date: Mon, 11 May 2026 14:09:15 -0400 Subject: [PATCH 3/3] clean up explanation --- fern/products/docs/pages/api-references/library-docs.mdx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fern/products/docs/pages/api-references/library-docs.mdx b/fern/products/docs/pages/api-references/library-docs.mdx index d24404cc4..5396750d7 100644 --- a/fern/products/docs/pages/api-references/library-docs.mdx +++ b/fern/products/docs/pages/api-references/library-docs.mdx @@ -4,7 +4,9 @@ description: Generate MDX documentation pages from your Python or C++ library so --- -The library docs generator parses your **Python or C++** library source code and generates MDX documentation pages for modules, classes, functions, methods, and parameters. Generated pages are integrated directly into your Fern Docs site with hierarchical navigation and automatic cross-links: when a fully qualified identifier from your library appears in a code block, the generator renders it as a hyperlink to the page documenting that symbol. +The library docs generator parses your **Python or C++** library source code and generates MDX documentation pages for modules, classes, functions, methods, and parameters. Generated pages are added to your Fern Docs site with hierarchical navigation. + +Cross-links are automatic. When a fully-qualified identifier appears in a code block — for example, in a class signature or type annotation — the generator links it to the page documenting that symbol, so readers can jump straight to the definition. ## Configuration