Skip to content

Commit

Permalink
Auto generate sidebar from header
Browse files Browse the repository at this point in the history
  • Loading branch information
ittus committed May 13, 2019
1 parent a74f2f9 commit 0c6e73c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ const store = new Vuex.Store({

sidebar(_, {config}) {
const sidebar = config.sidebar || []
if (sidebar === 'auto') return config.nav || []
return typeof sidebar === 'function' ? sidebar(store) : sidebar
},

Expand Down

0 comments on commit 0c6e73c

Please sign in to comment.