Skip to content

Commit

Permalink
chore(#542): update highlight.js plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
Decipher committed Aug 23, 2022
1 parent 26bc578 commit 45156df
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
7 changes: 0 additions & 7 deletions docs/nuxt/components/druxt/field/geshifield/Default.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,10 @@
</template>

<script>
import Vue from 'vue'
import hljs from 'highlight.js/lib/core'
import javascript from 'highlight.js/lib/languages/javascript'
import hljsVuePlugin from "@highlightjs/vue-plugin"
import 'highlight.js/styles/darcula.css'
import { DruxtFieldMixin } from 'druxt-entity'
hljs.registerLanguage('javascript', javascript)
Vue.use(hljsVuePlugin)
export default {
mixins: [DruxtFieldMixin]
}
Expand Down
2 changes: 1 addition & 1 deletion docs/nuxt/nuxt.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default {
css: [],

// Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
plugins: [],
plugins: ['~/plugins/highlight.client.js'],

// Auto import components: https://go.nuxtjs.dev/config-components
components: true,
Expand Down
7 changes: 7 additions & 0 deletions docs/nuxt/plugins/highlight.client.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import Vue from 'vue'
import hljs from 'highlight.js/lib/core'
import javascript from 'highlight.js/lib/languages/javascript'
import hljsVuePlugin from "@highlightjs/vue-plugin"

hljs.registerLanguage('javascript', javascript)
Vue.use(hljsVuePlugin)

0 comments on commit 45156df

Please sign in to comment.