Skip to content

Commit f23fcfc

Browse files
committed
feat: allow 'auto' in defined sidebar (fix vuejs#1252)
1 parent 2f1327b commit f23fcfc

File tree

1 file changed

+3
-0
lines changed
  • packages/@vuepress/theme-default/util

1 file changed

+3
-0
lines changed

packages/@vuepress/theme-default/util/index.js

+3
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,9 @@ export function resolveSidebarItems (page, regularPath, site, localePath) {
138138
return []
139139
} else {
140140
const { base, config } = resolveMatchingConfig(regularPath, sidebarConfig)
141+
if (config === 'auto') {
142+
return resolveHeaders(page)
143+
}
141144
return config
142145
? config.map(item => resolveItem(item, pages, base))
143146
: []

0 commit comments

Comments
 (0)