Skip to content

Commit

Permalink
Fix active link matching in nav
Browse files Browse the repository at this point in the history
  • Loading branch information
zerebos committed Dec 1, 2024
1 parent 2d1fb43 commit 7d8bc17
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 8 deletions.
18 changes: 10 additions & 8 deletions .vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,23 @@ const VITEPRESS_CONFIG: UserConfig<DefaultTheme.Config> = {
logo: "/branding/logo_large.svg",
nav: [
{text: "Home", link: "/"},
{text: "User Guides", link: "/users/"},
{text: "User Guides", link: "/users/", activeMatch: "/users/"},
{
text: "Developer Guides",
items: [
{text: "General", link: "/developers/"},
{text: "Plugins", link: "/plugins/"},
{text: "Themes", link: "/themes/"},
]
{text: "General", link: "/developers/", activeMatch: "/developers/"},
{text: "Plugins", link: "/plugins/", activeMatch: "/plugins/"},
{text: "Themes", link: "/themes/", activeMatch: "/themes/"},
],
activeMatch: "/(?:developers|plugins|themes)/"
},
{
text: "Reference",
items: [
{text: "API", link: "/api/"},
{text: "Discord", link: "/discord/"},
]
{text: "API", link: "/api/", activeMatch: "/api/"},
{text: "Discord", link: "/discord/", activeMatch: "/discord/"},
],
activeMatch: "/(?:api|discord)/"
},
],

Expand Down
12 changes: 12 additions & 0 deletions .vitepress/theme/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,18 @@ span.line .global-bdapi {
}


/* TODO: poll this */
/* .vp-doc a.header-anchor {
position: initial;
margin: 0 0 0 5px;
opacity: 1;
}
.vp-doc a.header-anchor:hover {
color: var(--vp-c-brand-1);
text-decoration: underline;
} */


/**
* Colors: Palette
Expand Down

0 comments on commit 7d8bc17

Please sign in to comment.