improve demo component
This commit is contained in:
10
src/main.js
10
src/main.js
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user