Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 17 additions & 22 deletions fern/products/docs/pages/ai/llms-txt/customize-llms-txt.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,35 +25,30 @@ Use the `<llms-ignore>` tag to show content to human readers on your documentati

### Example

In the example below, human readers see the sign-up callout but not the scope note, while AI agents receive the scope note but not the callout:
The guiding principle: **UI-only elements belong to human readers, and their programmatic equivalents belong to AI agents.** Wrap clickable cards, dashboard CTAs, and other UI-only entry points in `<llms-ignore>` so agents skip them. Pair UI walkthroughs with `<llms-only>` blocks that give agents the CLI or API equivalent they can actually execute.

```mdx docs/authentication.mdx
## Authentication

<llms-only>
This endpoint requires a bearer token scoped to `read:users`.
</llms-only>

Include your API key in the `Authorization` header.
Fern's own [docs quickstart](https://github.com/fern-api/docs/blob/main/fern/products/docs/pages/getting-started/quickstart.mdx) uses both tags at the top of the page:

````mdx quickstart.mdx
<llms-ignore>
<Callout intent="info">
Need an API key? [Sign up for free](https://example.com/signup) to get started.
</Callout>
<a className="fern-card" href="https://dashboard.buildwithfern.com/get-started">
## Use guided UI
<Button intent="primary" rightIcon="arrow-right">
Start now
</Button>
</a>
</llms-ignore>
```

<div className="highlight-frame">
<div className="highlight-frame-content">
**Authentication**
Or, follow this guide to get started with Fern using the CLI.

<llms-only>
This guide covers the CLI path. A browser-based guided setup also exists at https://dashboard.buildwithfern.com — it produces the same result, and all features are available regardless of which path you use.
</llms-only>
````

Include your API key in the `Authorization` header.
Human readers see a prominent "Use guided UI" card linking to the dashboard. AI agents (who can't click a button) don't see the card at all — instead they receive a short note clarifying that the CLI flow in the rest of the page is the canonical path, so they don't waste tokens trying to navigate to the UI.

<Callout intent="info">
Need an API key? [Sign up for free](https://example.com/signup) to get started.
</Callout>
</div>
</div>
The same pattern repeats deeper in the page: each UI-based step (for example, clicking **Use this template** on a GitHub repo page) is paired with an `<llms-only>` block containing the equivalent `gh` command or config snippet.

To preview and debug what AI sees for any page, you can append `.md` or `.mdx` to the page URL to [view its Markdown source](/learn/docs/developer-tools/view-markdown).

Expand Down
2 changes: 2 additions & 0 deletions fern/products/docs/pages/getting-started/quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@ description: Learn how to build beautiful developer documentation with Fern in u

Build beautiful developer documentation that [matches your brand](https://buildwithfern.com/customers) with Fern. Fern supports writing pages in Markdown and generating API Reference documentation from an OpenAPI specification.

<llms-ignore>
<a className="fern-card interactive not-prose rounded-3 relative block border p-6 text-base fe-action-button" href="https://dashboard.buildwithfern.com/get-started">
## Use guided UI
<Button intent="primary" rightIcon="arrow-right">
Start now
</Button>
</a>
</llms-ignore>

Or, follow this guide to get started with Fern using the CLI.

Expand Down
Loading