From 191ba4e746925b9273273216faddebe12420a798 Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Thu, 26 Feb 2026 18:19:45 +0000 Subject: [PATCH 1/2] Add library docs page to API References section --- fern/products/docs/docs.yml | 3 + .../pages/api-references/library-docs.mdx | 164 ++++++++++++++++++ 2 files changed, 167 insertions(+) create mode 100644 fern/products/docs/pages/api-references/library-docs.mdx diff --git a/fern/products/docs/docs.yml b/fern/products/docs/docs.yml index e785b02fb..825faee87 100644 --- a/fern/products/docs/docs.yml +++ b/fern/products/docs/docs.yml @@ -269,6 +269,9 @@ navigation: - page: GraphQL Reference path: ./pages/api-references/generate-graphql-ref.mdx slug: generate-graphql-ref + - page: Library Docs + path: ./pages/api-references/library-docs.mdx + slug: library-docs - section: Customization skip-slug: true contents: diff --git a/fern/products/docs/pages/api-references/library-docs.mdx b/fern/products/docs/pages/api-references/library-docs.mdx new file mode 100644 index 000000000..37defaaa6 --- /dev/null +++ b/fern/products/docs/pages/api-references/library-docs.mdx @@ -0,0 +1,164 @@ +--- +title: Library Docs +subtitle: Generate reference documentation for your client libraries directly from source code. +--- + + + +Fern can generate reference documentation for your client libraries (e.g., Python SDKs) directly from source code. Library docs are auto-generated MDX pages that document modules, classes, methods, and parameters — rendered as first-class sections in your docs site. + + +Library docs is currently in **beta**. Python and C++ are supported today. + + +## How it works + +1. You define a `libraries` configuration in your `docs.yml` pointing to a Git repository containing your library source code. +2. Running `fern docs md generate` parses the source code and generates MDX files with full navigation. +3. You reference the library in your navigation using the `library` navigation item, and Fern renders the generated pages as a section in your docs. + +## Configuration + + + + +Add a `libraries` entry to your `docs.yml` file. Each library needs an `input` source, an `output` directory, and a `lang` (language). + +```yaml title="docs.yml" {1-7} +libraries: + my-python-sdk: + input: + git: https://github.com/acme/sdk-python + subpath: src/sdk # optional: path within the repo + output: + path: ./static/sdk-docs + lang: python +``` + +The `input` can be a Git repository: + +| Property | Description | Required | +|-----------|----------------------------------------------------------|----------| +| `git` | GitHub URL to the repository containing the library source code. | Yes | +| `subpath` | Path within the repository to the library source. | No | + +The `output` specifies where generated MDX files are written: + +| Property | Description | Required | +|----------|------------------------------------------------|----------| +| `path` | The output directory for generated MDX files. | Yes | + + + + +Run the generation command to parse your library source code and produce MDX files: + +```bash +fern docs md generate +``` + +This generates MDX files and a `_navigation.yml` file in the configured output directory. The generated files document all public modules, classes, methods, and their parameters. + + + + +Reference the library in your `docs.yml` navigation using the `library` key. The value must match a key defined in your `libraries` section. + +```yaml title="docs.yml" {10-11} +libraries: + my-python-sdk: + input: + git: https://github.com/acme/sdk-python + output: + path: ./static/sdk-docs + lang: python + +navigation: + - library: my-python-sdk + title: Python SDK Reference # optional: override display title + slug: python-sdk # optional: override URL slug +``` + +Fern reads the generated `_navigation.yml` and MDX files from the output directory and renders them as a full navigation section in your docs. + + + + +Preview your docs locally with: + +```bash +fern docs dev +``` + +When ready, publish with: + +```bash +fern generate --docs +``` + + + + +## Supported languages + +| Language | Status | +|----------|--------| +| Python | Beta | +| C++ | Beta | + +## Configuration reference + +### `libraries` (top-level) + +The `libraries` key is a map where each entry defines a library to generate docs for. + +```yaml title="docs.yml" +libraries: + : + input: + git: + subpath: # path within the repo + output: + path: # where MDX files are written + lang: # python or cpp +``` + +### `library` (navigation item) + +The `library` navigation item references a library defined in the `libraries` section. + +```yaml title="docs.yml" +navigation: + - library: # must match a key in `libraries` + title: # override display title + slug: # override URL slug +``` + +## Multiple libraries + +You can define multiple libraries and include them in your navigation: + +```yaml title="docs.yml" +libraries: + python-sdk: + input: + git: https://github.com/acme/sdk-python + output: + path: ./static/python-sdk-docs + lang: python + cpp-sdk: + input: + git: https://github.com/acme/sdk-cpp + output: + path: ./static/cpp-sdk-docs + lang: cpp + +navigation: + - section: SDK References + contents: + - library: python-sdk + title: Python SDK + - library: cpp-sdk + title: C++ SDK + - api: API Reference +``` From dfb4984eecdce9ef38ed5c75f82babf90b3e8cfb Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Thu, 26 Feb 2026 18:23:08 +0000 Subject: [PATCH 2/2] Fix vale lint: remove time-relative terms --- fern/products/docs/pages/api-references/library-docs.mdx | 2 +- 1 file changed, 1 insertion(+), 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 37defaaa6..b59fc9651 100644 --- a/fern/products/docs/pages/api-references/library-docs.mdx +++ b/fern/products/docs/pages/api-references/library-docs.mdx @@ -8,7 +8,7 @@ subtitle: Generate reference documentation for your client libraries directly fr Fern can generate reference documentation for your client libraries (e.g., Python SDKs) directly from source code. Library docs are auto-generated MDX pages that document modules, classes, methods, and parameters — rendered as first-class sections in your docs site. -Library docs is currently in **beta**. Python and C++ are supported today. +Library docs is in **beta**. Python and C++ are supported. ## How it works