Skip to content
This repository was archived by the owner on Mar 7, 2025. It is now read-only.

Commit 1e22774

Browse files
committed
Auto generate sidebar from header
1 parent 4ad0d8d commit 1e22774

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/store.js

+1
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,7 @@ const store = new Vuex.Store({
213213

214214
sidebar(_, {config}) {
215215
const sidebar = config.sidebar || []
216+
if (sidebar === 'auto') return config.nav || []
216217
return typeof sidebar === 'function' ? sidebar(store) : sidebar
217218
},
218219

0 commit comments

Comments
 (0)