This repository has been archived on 2024-05-21. You can view files and clone it, but cannot push or open issues or pull requests.
edu-dis-labs/docs/.vuepress/enhanceApp.js

31 lines
1.0 KiB
JavaScript
Raw Normal View History

2021-08-30 18:54:57 +03:00
import Vuex from 'vuex'
import VueChartkick from 'vue-chartkick'
import Chart from 'chart.js'
import VueGoodTablePlugin from 'vue-good-table';
// The styles are important in another component because of the way webpack is configured
// import 'vue-good-table/dist/vue-good-table.css'
export default ({ Vue, options, router, siteData }) => {
Vue.use(Vuex)
Vue.use(VueChartkick, {adapter: Chart})
Vue.use(VueGoodTablePlugin)
Vue.mixin({
computed: {
$title() {
const page = this.$page
const siteTitle = this.$siteTitle
const selfTitle = page.frontmatter.home ? null : (
page.frontmatter.title || // explicit title
(page.title ? page.title.replace(/[_`]/g, '') : '') // inferred title
)
return siteTitle
? selfTitle
? (selfTitle + ' | ' + siteTitle)
: siteTitle
: selfTitle || 'VuePress'
}
}
})
}