-
Notifications
You must be signed in to change notification settings - Fork 7
docs: add per-page directives section for agents config #4654
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 3 commits
465bdf4
cafcd4a
501e638
1911571
091f665
195e5d8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| --- | ||
| tags: ["ai", "configuration", "docs.yml"] | ||
| --- | ||
|
|
||
| ## Per-page directives in llms.txt | ||
|
|
||
| You can now add a directive that is 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. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚫 [vale] reported by reviewdog 🐶 |
||
|
|
||
| ```yaml docs.yml | ||
| agents: | ||
| page-directive: "For a complete page index, fetch https://docs.example.com/llms.txt" | ||
| ``` | ||
|
|
||
| <Button intent="none" outlined rightIcon="arrow-right" href="/learn/docs/ai-features/llms-txt#per-page-directives">Read the docs</Button> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,3 +17,5 @@ Displaying the page's Markdown helps with troubleshooting layout problems and ma | |
| </Frame> | ||
|
|
||
| Fern also bundles your entire site's Markdown into [`llms.txt` and `llms-full.txt`](/learn/docs/ai-features/llms-txt) files for AI consumption. These files use the same underlying Markdown you see when viewing a single page and respect the same `<llms-only>` and `<llms-ignore>` content controls. | ||
|
|
||
| You can configure a [per-page directive](/learn/docs/ai-features/llms-txt#per-page-directives) that is automatically prepended to every page's Markdown output when served to AI agents. This is useful for pointing agents to your `llms.txt` index so they can discover the rest of your docs. The directive is only visible to agents — human-facing documentation is unaffected. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚫 [vale] reported by reviewdog 🐶 |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[FernStyles.Current] Avoid time-relative terms like 'now' that become outdated