Skip to content

Commit 90df811

Browse files
refactor: integrate folder configuration into navigation overview
- Remove standalone folder-based-navigation.mdx page - Add concise 'Add pages from a folder' section to navigation overview - Create reusable snippet at /fern/snippets/folder-nav-basic.mdx - Add redirect from old URL to navigation overview - Add changelog entry for 2025-11-05 - Keep documentation dry and concise as requested Co-Authored-By: Deep Singhvi <[email protected]>
1 parent 1d1c5f0 commit 90df811

File tree

6 files changed

+28
-261
lines changed

6 files changed

+28
-261
lines changed

fern/docs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,8 @@ redirects:
312312
destination: /learn/docs/configuration/navigation
313313
- source: /learn/docs/navigation/overview
314314
destination: /learn/docs/configuration/navigation
315+
- source: /learn/docs/configuration/folder-based-navigation
316+
destination: /learn/docs/configuration/navigation
315317
- source: /learn/docs/building-and-customizing-your-docs/versioning
316318
destination: /learn/docs/configuration/versions
317319
- source: /learn/docs/navigation/versions

fern/products/docs/docs.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ navigation:
1919
path: ./pages/customization/what-is-docs-yml.mdx
2020
- page: Navigation
2121
path: ./pages/navigation/overview.mdx
22-
- page: Folder-based navigation
23-
path: ./pages/navigation/folder-based-navigation.mdx
2422
- page: Tabs and tab variants
2523
path: ./pages/navigation/tabs.mdx
2624
slug: tabs
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
## Folder-based navigation
2+
3+
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.
4+
5+
<Markdown src="/snippets/folder-nav-basic.mdx" />
6+
7+
Subfolders become nested sections. Supported options: `title`, `slug`, `icon`, `collapsed`, `hidden`, `skip-slug`, `availability`.
8+
9+
[Learn more about navigation configuration](/learn/docs/configuration/navigation#add-pages-from-a-folder).

fern/products/docs/pages/navigation/folder-based-navigation.mdx

Lines changed: 0 additions & 259 deletions
This file was deleted.

fern/products/docs/pages/navigation/overview.mdx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,14 @@ navigation:
8080
```
8181
{/* <!-- vale on --> */}
8282

83+
### Add pages from a folder
84+
85+
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.
86+
87+
<Markdown src="/snippets/folder-nav-basic.mdx" />
88+
89+
Subfolders become nested sections. Supported options: `title`, `slug`, `icon`, `collapsed`, `hidden`, `skip-slug`, `availability`.
90+
8391
### Hiding content
8492

8593
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.

fern/snippets/folder-nav-basic.mdx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
```yaml docs.yml
2+
navigation:
3+
- section: Getting started
4+
contents:
5+
- page: Introduction
6+
path: ./pages/intro.mdx
7+
- folder: ./pages/guides
8+
title: Guides
9+
```

0 commit comments

Comments
 (0)