releases.shpreview
Fern/Changelog

Changelog

Mon
Wed
Fri
JunJulAugSepOctNovDecJanFebMarAprMay
Less
More
Releases31Avg9/mo

Scope search by product or version

You can now control how search results are ranked and filtered for sites with multiple products or versions using the new settings.search object in docs.yml.

  • prioritize-current-product boosts results from the current product higher in the ranking without hiding other products.
  • default-filter-by-current-product auto-selects the current product as a facet filter so only current-product results appear by default.

These options can be used independently or together.

Markdown rendering for API components

Interactive API components now render as fenced code blocks and structured content in your site's Markdown output. AI agents consuming your docs via .md URLs, llms.txt, or llms-full.txt receive the full request and response examples without parsing HTML, reducing content disparity between the rendered page and its Markdown representation.

This applies to the following components:

CLI link checker

You can now check for broken links on your live documentation site directly from the Fern CLI with fern docs link check. The command scrapes every page on your published site, checks all internal and external links, and reports broken (404) and blocked (403) URLs along with the source pages where they appear.

fern docs link check --url https://buildwithfern.com/learn
fern docs link check --url https://elevenlabs.io/docs

This complements the existing broken-links rule in fern check, which validates internal links against your local YAML navigation tree. Use fern docs link check after publishing to catch live 404s and broken external URLs that local validation can't detect.

Custom robots.txt

You can now serve your own robots.txt at the root of your documentation site by pointing agents.robots-txt at a file in your repo. Use this to opt in or out of specific AI crawlers like GPTBot or ClaudeBot, gate sensitive sections from indexing, or signal training and search preferences with the Cloudflare Content Signals Policy. Your file is served verbatim at /robots.txt, and Fern appends a managed block disallowing internal API routes after your content.

agents:
  robots-txt: ./robots.txt

Multi-source docs

Multi-source docs lets each team publish independently to a shared custom domain — for example, docs.nvidia.com spans sub-paths like /nvcf, /brev, and /aiperf, each owned by a different product team and repository.

Set multi-source: true on the instance and reference a global theme for consistent branding across repositories.

global-theme: my-org-theme

instances:
  - url: example.docs.buildwithfern.com/product-a
    custom-domain: docs.example.com/product-a
    multi-source: true

API catalog discovery

AI agents, MCP clients, and API catalog crawlers can now discover your APIs automatically. Every Fern Docs site exposes a standards-based (RFC 9727) /.well-known/api-catalog endpoint generated from your visible API Reference navigation.

Custom URL actions on the Prompt component

You can now point <Prompt> actions at any AI tool, not just Cursor, Claude, and ChatGPT. Send readers to Perplexity, your own internal AI assistant, or any other URL.

<Prompt
  title="Generate a TypeScript SDK"
  actions={[
    { label: "Open in Perplexity", url: "https://www.perplexity.ai/search?q={prompt}", icon: "magnifying-glass" },
    "cursor"
  ]}
>
Generate a TypeScript SDK from my OpenAPI spec. Follow the [TypeScript SDK quickstart](https://buildwithfern.com/learn/sdks/generators/typescript/quickstart.md).
</Prompt>

Redesigned dynamic OG images

Dynamic OG images have a new layout with fine-grained control over the logo variant, text and background colors, and which elements appear (section, description, URL, gradient).

metadata:
  og:dynamic: true
  og:dynamic:background-image: ./images/og-background.png
  og:dynamic:text-color: "#1a1a1a"
  og:dynamic:background-color: "#ffffff"
  og:dynamic:logo-color: dark
  og:dynamic:show-logo: true
  og:dynamic:show-section: true
  og:dynamic:show-description: true
  og:dynamic:show-url: true
  og:dynamic:show-gradient: true

Prompt component

The <Prompt> component displays an AI prompt card with a title, icon, copy button, and optional "Open in" action buttons. Add it to any page so readers can copy instructions or open them directly in Cursor, Claude, or ChatGPT.

Use it in tutorials, quickstarts, migration guides, or any page where you want readers to hand off a task to an AI assistant — for example, scaffolding a project, generating an SDK, or applying a code change.

<Prompt
  title="Create a docs site"
  icon="rocket"
  actions={["cursor", "claude", "chatgpt"]}
>
You are a **docs setup assistant**. Help the user create and publish a new docs site.

Follow the [Quickstart guide](https://buildwithfern.com/learn/docs/getting-started/quickstart) step by step.
</Prompt>

Global themes

Define your documentation branding in a single control repository and share it across multiple sites. Use the fern docs theme CLI commands to export, upload, and manage themes, then reference a theme by name in any child repository's docs.yml with the global-theme property.

"Connect to Claude Code" page action

Fern Docs sites with Ask Fern enabled now display a "Connect to Claude Code" button alongside existing page actions. Clicking the button copies a claude mcp add command. Readers can paste it into their terminal to register your site's MCP server with Claude Code.

The action is enabled by default and can be toggled off with page-actions.options.claude-code: false in docs.yml.

Clean up GitHub Actions preview deployments on merge

The GitHub Actions preview workflow now has an optional companion cleanup-preview.yml workflow that deletes a pull request's preview deployment once the PR merges, so stale previews don't linger.

To adopt this workflow, add .github/workflows/cleanup-preview.yml alongside your existing preview workflow.

Clean up GitLab preview deployments on merge

The updated GitLab CI/CD pipeline now includes a cleanup_preview stage that deletes a merge request's preview deployment once the MR merges into the default branch, so stale previews don't linger.

To adopt this workflow, replace your .gitlab-ci.yml file with the updated version.

Target the logo from custom scripts

<Fern.Logo /> now renders with a data-fern-logo attribute so custom scripts can target the logo with document.querySelector('#fern-header [data-fern-logo]'). Use this to rewrite the logo's href on certain pages or modify other behavior.

Mobile table of contents bar

Pages using the guide and overview layouts can now display a sticky table of contents bar below the header on mobile and tablet viewports. The bar shows a scroll progress indicator and the current heading, and expands to the full table of contents when tapped.

Enable it by adding mobile-toc: true under layout in docs.yml:

layout:
  mobile-toc: true

AI search model update

Ask Fern now uses Claude 4.6 Sonnet and Claude 4.5 Haiku.

Link to API Reference sections with api: syntax

The api: link syntax now supports linking to the root of an API Reference section. Use api:apiName to create a link that resolves to the landing page of a specific API Reference at build time. This is useful when your project has multiple APIs.

Explore the [Plant Store API](api:plant-store) reference.

AsyncAPI spec endpoints

Fern docs sites serve your raw AsyncAPI 2.6.0 specification at /asyncapi.json and /asyncapi.yaml for sites with WebSocket channels. Download it for client generation, contract testing, or importing into AsyncAPI-compatible tools. The spec is also linked from your site's llms.txt, so AI coding assistants can discover and use it automatically.

Custom llms.txt and llms-full.txt files

Provide your own llms.txt and llms-full.txt files instead of using the auto-generated versions. Add paths to your files under the agents key in docs.yml:

agents:
  llms-txt: ./path/to/llms.txt
  llms-full-txt: ./path/to/llms-full.txt

Custom files are served at the root-level /llms.txt and /llms-full.txt endpoints. Nested paths continue to use auto-generated output.

Requires Fern CLI version 4.67.0 or later.

Default per-page directive for AI agents

Every page served to AI agents now includes a default directive that tells agents how to navigate your documentation programmatically — pointing them to .md URLs, llms.txt, and llms-full.txt. The directive is automatically generated using your site's domain and basepath, so no configuration is needed.

For clean Markdown of any page, append .md to the page URL. For a complete documentation index, see https://docs.example.com/llms.txt. For full documentation content, see https://docs.example.com/llms-full.txt.

You can still override the default with a custom directive or disable it entirely.

Standalone search widget

Embed Ask Fern's AI-powered search on any React site using the @fern-api/search-widget package. The widget renders a button that opens a search modal connected to your documentation content. It requires React 19; all other dependencies are bundled.

Per-page directives in llms.txt

You can add a directive that's automatically prepended to every page when it's served to AI agents — both individual Markdown page URLs and each page section within llms-full.txt. The directive is only visible to agents requesting Markdown; human-facing documentation is unaffected.

agents:
  page-directive: "For a complete page index, fetch https://docs.example.com/llms.txt"

Missing redirects check rule

The missing-redirects rule for fern check detects pages that were removed or moved without a redirect. It compares your current docs navigation against the previously published state and warns when a previously published URL would return a 404.

[warning] Page "products/api-def/openapi/extensions/default.mdx" was removed. The previously published URL "/learn/api-definitions/openapi/extensions/default-values" will return 404 without a redirect. Consider adding a redirect in docs.yml to preserve existing links.

Configure its severity in docs.yml:

check:
  rules:
    missing-redirects: error

Library docs generator

Generate MDX documentation pages from your Python or C++ library source code and include them in your Fern Docs site. Configure your libraries in docs.yml, run fern docs md generate, and the generated pages appear as navigation sections alongside your other documentation.

Configure fern check rule severity

You can now configure the severity of validation rules run by fern check directly in your docs.yml file using the check.rules property. Set individual rules to "warn" (non-blocking) or "error" (blocking) to control which checks fail your build.

check:
  rules:
    broken-links: error
    example-validation: warn

The --broken-links and --strict-broken-links CLI flags are now deprecated in favor of this configuration.

AI search upgrade

Ask Fern now runs on Claude 4.6 Sonnet for faster, more accurate answers.

Context7 integration

Host a Context7 verification file on your Fern docs site. Add integrations.context7 to your docs.yml pointing to your context7.json file, and Fern serves it at /context7.json on your domain.

integrations:
  context7: ./path/to/context7.json

Requires Fern CLI version 4.52.0 or later.

Tab alignment and placement options

You can now finetune how your tabs look and behave using theme.tabs in docs.yml. Choose between the default underline or bubble style, place tabs in the header or sidebar, and center-align header tabs from a single configuration block.

theme:
  tabs:
    style: bubble
    alignment: center
    placement: header

The existing string shorthand (e.g., theme.tabs: bubble) continues to work for simple style changes.

Sitemap timestamps

Your sitemap entries now include a <lastmod> timestamp that's invisible to readers and used exclusively by search engines to prioritize crawling recently updated pages. Timestamps update only when a page's content actually changes — trivial formatting differences like whitespace or capitalization are ignored. This follows Google's sitemap best practices.

Last Checked
3h ago
Tracking since Jan 24, 2024