Skip to content

Commit eeefcad

Browse files
devin-ai-integration[bot]kenny
andcommitted
docs: align example section with live multi-source.docs.buildwithfern.com site
Co-Authored-By: kenny <kenny@buildwithfern.com>
1 parent 7bbd3e2 commit eeefcad

1 file changed

Lines changed: 35 additions & 23 deletions

File tree

fern/products/docs/pages/preview-publish/multi-source.mdx

Lines changed: 35 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ For example, NVIDIA's docs are split across multiple independent repositories, e
2525
- [docs.nvidia.com/aiperf](https://docs.nvidia.com/aiperf)
2626
- [docs.nvidia.com/nemo/curator](https://docs.nvidia.com/nemo/curator)
2727

28-
Each sub-path is published independently, but end users see a single unified site. The root `docs.nvidia.com` itself is a separate site outside the Fern setup — multi-source covers only the sub-paths. A Fern-published landing page is optional ([example](#example-setup-with-a-homepage-and-three-teams)), and any combination of sub-paths works, including just two.
28+
Each sub-path is published independently, but end users see a single unified site. The root `docs.nvidia.com` itself is a separate site outside the Fern setup — multi-source covers only the sub-paths. A Fern-published landing page is optional ([example](#example-a-live-multi-source-site)), and any combination of sub-paths works, including just two.
2929

3030
## Set up multi-source docs
3131

@@ -110,20 +110,35 @@ Two search modes are available:
110110

111111
</Steps>
112112

113-
## Example: Homepage and three sub-paths
113+
## Example: A live multi-source site
114114

115-
This is the alternative shape to NVIDIA's setup: a Fern-managed homepage that serves as the root, with three product teams each on their own sub-path. Use this pattern when the root should be a landing page or product selector instead of pointing somewhere outside Fern.
115+
<Tip>
116+
Browse the live site at [multi-source.docs.buildwithfern.com](https://multi-source.docs.buildwithfern.com) and the source at [fern-api/docs-examples/multi-source](https://github.com/fern-api/docs-examples/tree/main/multi-source).
117+
</Tip>
116118

117-
The setup uses four `fern/` projects — a homepage at `/home` plus one per team at `/seeds`, `/greenhouses`, and `/nursery`. All four share the same global theme (`plantstore-theme`) and set `multi-source: true`; they differ only in their basepath:
119+
This is the alternative shape to NVIDIA's setup: a Fern-managed homepage at the bare root, plus team sub-paths underneath. The example uses six independent `fern/` projects on one shared domain — a homepage at `/`, a `/seeds` team hub with two nested sub-children, and standalone `/greenhouses` and `/nursery` teams:
120+
121+
```
122+
multi-source.docs.buildwithfern.com
123+
├── / ← homepage
124+
├── /seeds ← Seeds team hub
125+
│ ├── /seeds/sunflower ← Sunflower sub-team
126+
│ └── /seeds/tomato ← Tomato sub-team
127+
├── /greenhouses ← Greenhouses team
128+
└── /nursery ← Nursery team
129+
```
130+
131+
All six projects share `global-theme: plantstore-theme` and set `multi-source: true` — they differ only in their basepath. Sub-paths can themselves contain nested sub-paths: `/seeds/sunflower` and `/seeds/tomato` are independently published projects that live under `/seeds`.
132+
133+
The example uses Fern's preview domain (`*.docs.buildwithfern.com`), so no `custom-domain` is set. A production deployment typically adds `custom-domain: docs.example.com/...` to each instance.
118134

119135
<Tabs>
120136
<Tab title="Homepage">
121-
```yaml Homepage — docs.yml
137+
```yaml homepage/fern/docs.yml
122138
global-theme: plantstore-theme
123139

124140
instances:
125-
- url: plantstore.docs.buildwithfern.com/home
126-
custom-domain: docs.plantstore.com/home
141+
- url: multi-source.docs.buildwithfern.com
127142
multi-source: true
128143

129144
navigation:
@@ -135,25 +150,24 @@ The homepage `home.mdx` can use cards to direct users to each team's docs:
135150

136151
```jsx home.mdx
137152
<CardGroup>
138-
<Card title="Seeds" icon="fa-regular fa-seedling" href="https://docs.plantstore.com/seeds">
139-
Seed catalog and germination guides.
153+
<Card title="Seeds" icon="fa-regular fa-seedling" href="/seeds">
154+
A hub with nested sub-children at `/seeds/sunflower` and `/seeds/tomato`.
140155
</Card>
141-
<Card title="Greenhouses" icon="fa-regular fa-warehouse" href="https://docs.plantstore.com/greenhouses">
156+
<Card title="Greenhouses" icon="fa-regular fa-warehouse" href="/greenhouses">
142157
Climate control and monitoring.
143158
</Card>
144-
<Card title="Nursery" icon="fa-regular fa-leaf" href="https://docs.plantstore.com/nursery">
159+
<Card title="Nursery" icon="fa-regular fa-leaf" href="/nursery">
145160
Plant care and propagation.
146161
</Card>
147162
</CardGroup>
148163
```
149164
</Tab>
150-
<Tab title="Seeds team">
151-
```yaml Seeds team — docs.yml
165+
<Tab title="Seeds (hub)">
166+
```yaml seeds/fern/docs.yml
152167
global-theme: plantstore-theme
153168

154169
instances:
155-
- url: plantstore.docs.buildwithfern.com/seeds
156-
custom-domain: docs.plantstore.com/seeds
170+
- url: multi-source.docs.buildwithfern.com/seeds
157171
multi-source: true
158172

159173
navigation:
@@ -163,13 +177,12 @@ navigation:
163177
path: ./pages/overview.mdx
164178
```
165179
</Tab>
166-
<Tab title="Greenhouses team">
167-
```yaml Greenhouses team — docs.yml
180+
<Tab title="Sunflower (nested)">
181+
```yaml seeds-sunflower/fern/docs.yml
168182
global-theme: plantstore-theme
169183

170184
instances:
171-
- url: plantstore.docs.buildwithfern.com/greenhouses
172-
custom-domain: docs.plantstore.com/greenhouses
185+
- url: multi-source.docs.buildwithfern.com/seeds/sunflower
173186
multi-source: true
174187

175188
navigation:
@@ -179,13 +192,12 @@ navigation:
179192
path: ./pages/overview.mdx
180193
```
181194
</Tab>
182-
<Tab title="Nursery team">
183-
```yaml Nursery team — docs.yml
195+
<Tab title="Greenhouses">
196+
```yaml greenhouses/fern/docs.yml
184197
global-theme: plantstore-theme
185198

186199
instances:
187-
- url: plantstore.docs.buildwithfern.com/nursery
188-
custom-domain: docs.plantstore.com/nursery
200+
- url: multi-source.docs.buildwithfern.com/greenhouses
189201
multi-source: true
190202

191203
navigation:

0 commit comments

Comments
 (0)