You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 9e40b72
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: frontend/purestack.studio/components/site/nav-menu/nav-menu.mdx
+16Lines changed: 16 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -376,6 +376,22 @@ createApp(
376
376
</TabPane>
377
377
</Tabs>
378
378
379
+
## From site config
380
+
381
+
The menu the doc layout docks in its sidebar takes its tone, variant and extra classes from the `navigation` section of `siteConfig.json`. A page can still override the tone with `nav.tone` in its frontmatter.
382
+
383
+
```json
384
+
{
385
+
"navigation": {
386
+
"tone": "accent",
387
+
"variant": "glass",
388
+
"class": "spotlight-from-top-right"
389
+
}
390
+
}
391
+
```
392
+
393
+
Docked in the sidebar, the menu stays square and borderless whatever the variant, so the variant sets its fill and colors.
394
+
379
395
## Your own items
380
396
381
397
Pass `items` to show a tree that is not the site navigation, and `currentUrl` to say which page is current. Without `currentUrl`, NavMenu uses the page being rendered, then the browser location. Groups are items with `children`; a group can have its own `url` too.
0 commit comments