Skip to content

Commit e7369fd

Browse files
devin-ai-integration[bot]fern-supportbot_apkdevalog
authored
Break up llms.txt page into multiple smaller pages (#4966)
Co-authored-by: fern-support <support@buildwithfern.com> Co-authored-by: bot_apk <apk@cognition.ai> Co-authored-by: Devin Logan <devinannlogan@gmail.com>
1 parent 8fc53ad commit e7369fd

File tree

14 files changed

+271
-239
lines changed

14 files changed

+271
-239
lines changed

fern/products/docs/docs.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,20 @@ navigation:
178178
- page: AI-generated examples
179179
path: ./pages/ai/ai-examples.mdx
180180
slug: ai-examples
181-
- page: llms.txt
182-
path: ./pages/ai/llms-txt.mdx
183-
slug: llms-txt
181+
- section: llms-txt
182+
collapsed: open-by-default
183+
skip-slug: true
184+
contents:
185+
- page: Overview
186+
path: ./pages/ai/llms-txt/overview.mdx
187+
slug: llms-txt
188+
- page: Customize LLM output
189+
path: ./pages/ai/llms-txt/customize-llms-txt.mdx
190+
- page: Agent directives
191+
path: ./pages/ai/llms-txt/directives.mdx
192+
- page: Analytics and integration
193+
path: ./pages/ai/llms-txt/analytics-integration.mdx
194+
slug: llms-txt-analytics
184195
- section: Ask Fern
185196
slug: ask-fern
186197
contents:

fern/products/docs/pages/ai/llms-txt.mdx

Lines changed: 0 additions & 229 deletions
This file was deleted.
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
title: Analytics and integration
3+
description: Track LLM traffic to your docs in the Fern Dashboard and surface llms.txt endpoints to readers with buttons and navbar links.
4+
---
5+
6+
`llms.txt` and `llms-full.txt` are generated automatically for your site, but how readers and AI tools discover them is up to you. Track usage in the Fern Dashboard and surface endpoints directly in your docs.
7+
8+
## Track LLM traffic
9+
10+
The [Fern Dashboard](https://dashboard.buildwithfern.com/) provides analytics for `llms.txt` usage including:
11+
- Traffic by LLM provider (Claude, ChatGPT, Cursor, etc.)
12+
- Page-level breakdowns of bot vs. human visitors for Markdown and `llms.txt` files
13+
14+
## Surface endpoints to readers
15+
16+
To make endpoints discoverable to human readers, add buttons or navigation links:
17+
18+
<AccordionGroup>
19+
<Accordion title="Add a button for SDK docs">
20+
Add a button to your SDK docs that links to the `llms-full.txt` for your API Reference. Use `lang` to filter code examples to one language, and `excludeSpec=true` to exclude the raw OpenAPI specification.
21+
22+
```jsx Markdown
23+
<Button href="/api-reference/llms-full.txt?lang=python&excludeSpec=true" target="_blank">
24+
Open Python API Reference for LLMs
25+
</Button>
26+
```
27+
28+
This gives users a clean, language-specific output they can feed to AI tools when writing code.
29+
</Accordion>
30+
31+
<Accordion title="Add a dropdown for llms-full.txt">
32+
Add a dropdown in your navbar that links to different filtered versions of `llms-full.txt`, making it easy for users to access LLM-optimized documentation for their preferred language.
33+
34+
```yaml docs.yml
35+
navbar-links:
36+
- type: dropdown
37+
text: LLMs
38+
icon: fa-solid fa-robot
39+
links:
40+
- text: Full docs
41+
href: /llms-full.txt
42+
- text: Python SDK
43+
href: /api-reference/llms-full.txt?lang=python&excludeSpec=true
44+
- text: TypeScript SDK
45+
href: /api-reference/llms-full.txt?lang=typescript&excludeSpec=true
46+
- text: Go SDK
47+
href: /api-reference/llms-full.txt?lang=go&excludeSpec=true
48+
```
49+
</Accordion>
50+
</AccordionGroup>

0 commit comments

Comments
 (0)