Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
2 changes: 2 additions & 0 deletions fern/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,8 @@ redirects:
destination: /learn/docs/configuration/navigation
- source: /learn/docs/navigation/overview
destination: /learn/docs/configuration/navigation
- source: /learn/docs/configuration/folder-based-navigation
destination: /learn/docs/configuration/navigation
- source: /learn/docs/building-and-customizing-your-docs/versioning
destination: /learn/docs/configuration/versions
- source: /learn/docs/navigation/versions
Expand Down
9 changes: 9 additions & 0 deletions fern/products/docs/pages/changelog/2025-11-05.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
## Folder-based navigation

Auto-generate navigation from a folder of markdown files using the new `folder` configuration. Instead of manually listing each page in `docs.yml`, point to a folder and Fern discovers all `.md` and `.mdx` files and adds them to the navigation.

<Markdown src="/snippets/folder-nav-basic.mdx" />

Subfolders become nested sections. Supported options: `title`, `slug`, `icon`, `collapsed`, `hidden`, `skip-slug`, `availability`.

[Learn more about navigation configuration](/learn/docs/configuration/navigation#add-pages-from-a-folder).
8 changes: 8 additions & 0 deletions fern/products/docs/pages/navigation/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,14 @@ navigation:
```
{/* <!-- vale on --> */}

### Add pages from a folder

Use `folder` to auto-generate pages from a directory. Fern discovers all `.md` and `.mdx` files in the specified folder and adds them to the navigation.

<Markdown src="/snippets/folder-nav-basic.mdx" />

Subfolders become nested sections. Supported options: `title`, `slug`, `icon`, `collapsed`, `hidden`, `skip-slug`, `availability`.

### Hiding content

To hide a page or an entire section of your docs, add `hidden: true`. A hidden page or section will still be discoverable using the exact URL, but it will be excluded from search and won't be indexed.
Expand Down
9 changes: 9 additions & 0 deletions fern/snippets/folder-nav-basic.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
```yaml docs.yml
navigation:
- section: Getting started
contents:
- page: Introduction
path: ./pages/intro.mdx
- folder: ./pages/guides
title: Guides
```
Loading