Quellcode durchsuchen

add active match

ruki vor 6 Monaten
Ursprung
Commit
e64aaba5b6
2 geänderte Dateien mit 4 neuen und 4 gelöschten Zeilen
  1. 2 2
      docs/config.ts
  2. 2 2
      docs/zh/config.ts

+ 2 - 2
docs/config.ts

@@ -33,8 +33,8 @@ function nav(): DefaultTheme.NavItem[] {
       items: [
       items: [
         { text: 'Guide', link: '/guide/what-is-xmake', activeMatch: '/guide/' },
         { text: 'Guide', link: '/guide/what-is-xmake', activeMatch: '/guide/' },
         { text: 'Getting Started', link: '/guide/getting-started' },
         { text: 'Getting Started', link: '/guide/getting-started' },
-        { text: 'Examples', link: '/examples/cpp/basic' },
-        { text: 'API Reference', link: '/api/description/specification' }
+        { text: 'Examples', link: '/examples/cpp/basic', activeMatch: '/examples/' },
+        { text: 'API Reference', link: '/api/description/specification', activeMatch: '/api/' }
       ]
       ]
     },
     },
     {
     {

+ 2 - 2
docs/zh/config.ts

@@ -108,8 +108,8 @@ function nav(): DefaultTheme.NavItem[] {
       items: [
       items: [
         { text: '使用指南', link: '/zh/guide/what-is-xmake', activeMatch: '/zh/guide/' },
         { text: '使用指南', link: '/zh/guide/what-is-xmake', activeMatch: '/zh/guide/' },
         { text: '快速上手', link: '/zh/guide/getting-started' },
         { text: '快速上手', link: '/zh/guide/getting-started' },
-        { text: '示例', link: '/zh/examples/cpp/basic' },
-        { text: 'API 手册', link: '/zh/api/description/specification' }
+        { text: '示例', link: '/zh/examples/cpp/basic', activeMatch: '/zh/examples/' },
+        { text: 'API 手册', link: '/zh/api/description/specification', activeMatch: '/zh/api/' }
       ]
       ]
     },
     },
     {
     {