mirror of
https://github.com/siderolabs/talos.git
synced 2025-08-19 05:31:14 +02:00
This adds the logic for handling multiple versions of documentation, and adds a copy of the v0.2 docs as a starting point. Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
52 lines
785 B
JavaScript
52 lines
785 B
JavaScript
export const state = () => ({
|
|
activeDocPath: '',
|
|
lang: '',
|
|
version: '',
|
|
sections: {},
|
|
menu: []
|
|
})
|
|
|
|
export const getters = {
|
|
getMenu(state) {
|
|
return state.menu
|
|
},
|
|
|
|
getSections(state) {
|
|
return state.sections
|
|
},
|
|
|
|
getLang(state, lang) {
|
|
return state.lang
|
|
},
|
|
|
|
getVersion(state) {
|
|
return state.version
|
|
},
|
|
|
|
getActiveDocPath(state) {
|
|
return state.activeDocPath
|
|
}
|
|
}
|
|
|
|
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
|
|
},
|
|
|
|
setActiveDocPath(state, activeDocPath) {
|
|
state.activeDocPath = activeDocPath.replace('docs/', '')
|
|
}
|
|
}
|