improve demo component

This commit is contained in:
Philipp Kühn
2020-03-05 09:18:17 +01:00
parent 60d6a34d14
commit 8b1b83252e
8 changed files with 84 additions and 96 deletions

View File

@@ -1,18 +1,16 @@
// This is the main.js file. Import global CSS and scripts here.
// The Client API can be used here. Learn more: gridsome.org/docs/client-api
import Prism from 'prismjs'
import 'prismjs/themes/prism-okaidia.css'
import DefaultLayout from '~/layouts/Default.vue'
import Prism from 'prismjs'
import Demo from '~/components/Demo.vue'
export default function (Vue, { router, head, isClient }) {
Vue.component('Layout', DefaultLayout)
Vue.component('Demo', Demo)
Vue.filter('highlight', (code, lang = 'javascript') => {
return Prism.highlight(code, Prism.languages[lang], lang)
})
Vue.component('Layout', DefaultLayout)
}