Skip to content

Commit

Permalink
Merge pull request #56 from yel-hadd/master
Browse files Browse the repository at this point in the history
There was an issue in importing sidebar items object via inject.
  • Loading branch information
bogdanssh authored Jan 30, 2024
2 parents 12499f7 + fbdaab7 commit 1628ac0
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions docs/.vuepress/theme/util.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {inject} from "vue";
import sidebarItems from "../config-client/sidebar";

export const hashRE = /#.*$/ // a regular expression to match the hash portion of a URL.
export const extRE = /\.(md|html)$/ // a regular expression to match file extensions.
Expand Down Expand Up @@ -163,8 +163,7 @@ function resolvePath(relative, base, append) {
*/

export function resolveSidebarItems(page, route, pages) {
const {locales} = inject('themeConfig')
const {base, config} = resolveMatchingConfig(route, locales.sidebar)
const {base, config} = resolveMatchingConfig(route, sidebarItems)
return config
? config.map(item => resolveItem(item, pages, base))
: []
Expand Down

0 comments on commit 1628ac0

Please sign in to comment.