added vue-meta plugin, fixed article prev next, fixed page title on articles

This commit is contained in:
2020-12-24 19:05:45 +01:00
parent 78155f83b8
commit c1f117d7bb
7 changed files with 114 additions and 51 deletions

View File

@ -68,11 +68,14 @@ export default {
dispatch('getItems')
},
getItemIndex ({ dispatch, commit, state }, nid) {
console.log('getItemIndex nid', nid)
return state.items.findIndex((e) => {
return e.nid == nid
// console.log('findIndex', e, nid);
return e.nid === nid
})
},
getPrevNextItems ({ dispatch, commit, state }, index) {
// TODO: preload prev and next items
return {
prev: state.items[index - 1],
next: state.items[index + 1]