Skip to content

Commit

Permalink
feat: allow 'auto' in defined sidebar (fix vuejs#1252)
Browse files Browse the repository at this point in the history
  • Loading branch information
bobheadxi committed May 10, 2020
1 parent 2f1327b commit f23fcfc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/@vuepress/theme-default/util/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,9 @@ export function resolveSidebarItems (page, regularPath, site, localePath) {
return []
} else {
const { base, config } = resolveMatchingConfig(regularPath, sidebarConfig)
if (config === 'auto') {
return resolveHeaders(page)
}
return config
? config.map(item => resolveItem(item, pages, base))
: []
Expand Down

0 comments on commit f23fcfc

Please sign in to comment.