Skip to content

Commit 346fdfe

Browse files
docs: clarify link checking rules in AGENTS.md (#4993)
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Devin Logan <devinannlogan@gmail.com>
1 parent b9abc19 commit 346fdfe

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

AGENTS.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,9 @@ Internal links between documentation pages use **URL paths built from the YAML c
2626
| `{product-slug}` | `slug` field on the product in `fern/docs.yml` | `docs`, `sdks`, `dashboard` |
2727
| `{section-slug}` | Section name or `slug` override in the product's YML file | `getting-started`, `ai-features` |
2828
| `{page-slug}` | Page name or `slug` override in the product's YML file | `overview`, `llms-txt` |
29+
| `skip-slug: true` | Set on a product, section, or tab | Omits that segment from the URL entirely |
2930

30-
The Home product has no slug, so its pages start at `/learn/{section}/{page}`.
31+
Products, sections, and tabs with `skip-slug: true` — or with no `slug:` field at all (like the Home product in `fern/docs.yml`) — are omitted from the URL. The Home product's pages therefore start at `/learn/{section-slug}/{page-slug}`.
3132

3233
### Example
3334

@@ -73,9 +74,11 @@ The correct link is:
7374

7475
1. Find the product's `slug` in `fern/docs.yml`.
7576
2. Open the product's YML file (e.g., `fern/products/docs/docs.yml`).
76-
3. Find the target page — check for explicit `slug:` overrides on both the section and the page.
77-
4. If no explicit slug, the slug is auto-derived: lowercased and hyphenated from the display name.
78-
5. Assemble: `/learn/{product-slug}/{section-slug}/{page-slug}`.
77+
3. Walk from the product down to the target page. For each section and the page itself:
78+
- If it has `skip-slug: true`, omit it from the URL.
79+
- Otherwise, use its explicit `slug:` if set. Page frontmatter `slug:` takes precedence over `slug:` in the navigation YML.
80+
- If no explicit slug is set, auto-derive it: lowercased and hyphenated from the display name.
81+
4. Assemble: `/learn/{product-slug}/{section-slug}/{page-slug}`.
7982

8083
### What's fine as-is
8184

0 commit comments

Comments
 (0)