Newer
Older
import About from './components/About.vue'
import DictionaryView from './components/DictionaryView.vue'
import vuetify from './plugins/vuetify'
import VueSocialSharing from 'vue-social-sharing'
Vue.use(VueSocialSharing);
Vue.use(VuePlausible, {
domain: 'beta.ordbok.uib.no'
})
Vue.$plausible.enableAutoPageviews()
const router = new VueRouter({
mode: 'history',
base: __dirname,
routes: [
{
children: [
{
path: 'om',
name: 'about',
component: About
},
{
path: '',
component: DictionaryView,
children: [
children: [
{
name: 'word',
path: 'w/:word'
},
{
name: 'lookup',
path: ':id(\\d+)/:lemma?'
},
{
name: 'search',
path: 'search/:query'
}
]
},
{
path: 'bob/*',
redirect: to => {
return "bm/" + to.params.pathMatch
}
},
{
path: 'nob/*',
redirect: to => {
console.log(to)
return "nn/" + to.params.pathMatch
}
},
{
path: 'bob,nob/*',
redirect: to => {
return "bm,nn/" + to.params.pathMatch
}