Skip to content

Commit 0eb40e2

Browse files
committed
Navigation
1 parent fa38824 commit 0eb40e2

15 files changed

+15
-34
lines changed

core-concepts/navigation.mdx

Lines changed: 15 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,6 @@ description: "Structure and customize your documentation's navigation hierarchy"
44
icon: "map"
55
---
66

7-
export const LayoutFrame = ({ children }) => (
8-
<div className="flex justify-center py-6 pointer-events-none border border-zinc-200/50 dark:border-zinc-800 rounded-2xl bg-zinc-100 dark:bg-zinc-900">
9-
{children}
10-
</div>
11-
)
12-
137
The [navigation](/core-concepts/settings#param-navigation) property in [docs.json](/core-concepts/settings) defines how users will browse through your documentation. Think of it as the blueprint for your documentation's menu structure.
148

159
With proper navigation configuration, you can organize your content into a logical hierarchy that makes it easy for users to find exactly what they're looking for.
@@ -18,10 +12,8 @@ With proper navigation configuration, you can organize your content into a logic
1812

1913
Pages are the most fundamental navigation component.
2014

21-
<LayoutFrame>
22-
<img className="block dark:hidden w-52" src="/images/navigation/pages-light.png" />
23-
<img className="hidden dark:block w-52" src="/images/navigation/pages-dark.png" />
24-
</LayoutFrame>
15+
<img className="block dark:hidden" src="/images/navigation/pages-light.png" />
16+
<img className="hidden dark:block" src="/images/navigation/pages-dark.png" />
2517

2618
Pages is an array where each entry must be a reference to the path of a [page file](/core-concepts/pages).
2719

@@ -44,10 +36,8 @@ Pages is an array where each entry must be a reference to the path of a [page fi
4436

4537
Groups allow you to group your pages. Groups can also be nested within each other.
4638

47-
<LayoutFrame>
48-
<img className="block dark:hidden w-52" src="/images/navigation/groups-light.png" />
49-
<img className="hidden dark:block w-52" src="/images/navigation/groups-dark.png" />
50-
</LayoutFrame>
39+
<img className="block dark:hidden" src="/images/navigation/groups-light.png" />
40+
<img className="hidden dark:block" src="/images/navigation/groups-dark.png" />
5141

5242
```json
5343
{
@@ -79,10 +69,8 @@ Groups allow you to group your pages. Groups can also be nested within each othe
7969
Tabs help distinguish between different topics or sections of your
8070
documentation.
8171

82-
<LayoutFrame>
83-
<img className="block dark:hidden w-52" src="/images/navigation/tabs-light.png" />
84-
<img className="hidden dark:block w-52" src="/images/navigation/tabs-dark.png" />
85-
</LayoutFrame>
72+
<img className="block dark:hidden" src="/images/navigation/tabs-light.png" />
73+
<img className="hidden dark:block" src="/images/navigation/tabs-dark.png" />
8674

8775
```json
8876
"navigation": {
@@ -117,10 +105,8 @@ documentation.
117105

118106
Anchors are another way to section your content. They show up on top of your side navigation.
119107

120-
<LayoutFrame>
121-
<img className="block dark:hidden w-52" src="/images/navigation/anchors-light.png" />
122-
<img className="hidden dark:block w-52" src="/images/navigation/anchors-dark.png" />
123-
</LayoutFrame>
108+
<img className="block dark:hidden" src="/images/navigation/anchors-light.png" />
109+
<img className="hidden dark:block" src="/images/navigation/anchors-dark.png" />
124110

125111
The configuration is very similar to tabs.
126112

@@ -161,10 +147,8 @@ While not required, we highly recommend that you set an `icon` field as well.
161147

162148
Dropdowns show up in the same place as anchors, but are consolidated into a single dropdown.
163149

164-
<LayoutFrame>
165-
<img className="block dark:hidden w-52" src="/images/navigation/dropdowns-light.png" />
166-
<img className="hidden dark:block w-52" src="/images/navigation/dropdowns-dark.png" />
167-
</LayoutFrame>
150+
<img className="block dark:hidden" src="/images/navigation/dropdowns-light.png" />
151+
<img className="hidden dark:block" src="/images/navigation/dropdowns-dark.png" />
168152

169153
While not required, we also recommend that you set an icon for each dropdown item.
170154

@@ -204,10 +188,8 @@ While not required, we also recommend that you set an icon for each dropdown ite
204188

205189
Versions can be leveraged to partition your navigation into different versions.
206190

207-
<LayoutFrame>
208-
<img className="block dark:hidden w-52" src="/images/navigation/versions-light.png" />
209-
<img className="hidden dark:block w-52" src="/images/navigation/versions-dark.png" />
210-
</LayoutFrame>
191+
<img className="block dark:hidden" src="/images/navigation/versions-light.png" />
192+
<img className="hidden dark:block" src="/images/navigation/versions-dark.png" />
211193

212194
```json
213195
{
@@ -242,10 +224,9 @@ Versions can be leveraged to partition your navigation into different versions.
242224

243225
Languages can be leveraged to partition your navigation into different languages.
244226

245-
<LayoutFrame>
246-
<img className="block dark:hidden w-52" src="/images/navigation/languages-light.png" />
247-
<img className="hidden dark:block w-52" src="/images/navigation/languages-dark.png" />
248-
</LayoutFrame>
227+
<img className="block dark:hidden" src="/images/navigation/languages-light.png" />
228+
<img className="hidden dark:block" src="/images/navigation/languages-dark.png" />
229+
249230

250231
We currently support the following languages:
251232

images/navigation/anchors-dark.png

-27.6 KB
Loading
-26.8 KB
Loading
-35.6 KB
Loading
-34 KB
Loading

images/navigation/groups-dark.png

-28.5 KB
Loading

images/navigation/groups-light.png

-27.9 KB
Loading
-5 KB
Loading
-5.15 KB
Loading

images/navigation/pages-dark.png

-30.1 KB
Loading

0 commit comments

Comments
 (0)