talos/docs/website/store/sidebar.js
Timothy Gerla 688efabb93 fix: clean up docs page scripts in preparation for 0.5 docs
- simplify the docs page handling logic and get more nuxt-like
- the handleClick function was vestigial and didn't do anything anymore, remove it
- simplify the Vuex state quite a bit, remove activeDocPath
- clean up github link generation code, and fix #2076

Signed-off-by: Timothy Gerla <tim@gerla.net>
2020-05-02 02:49:19 -07:00

25 lines
355 B
JavaScript

export const state = () => ({
lang: '',
version: '',
sections: {},
menu: []
})
export const mutations = {
setMenu(state, menu) {
state.menu = menu
},
setSections(state, sections) {
state.sections = sections
},
setLang(state, lang) {
state.lang = lang
},
setVersion(state, version) {
state.version = version
}
}