README
vue-hljs
Install
npm install vue-hljs --save
or
yarn add vue-hljs
Useage
import Vue from "vue";
import vueHljs from "vue-hljs";
import hljs from "highlight.js";
//if you want to use default color, import this css file
import "vue-hljs/dist/style.css";
//use
Vue.use(vueHljs, { hljs })
<div v-highlight>
<pre>
<code class="you can specify the language here">...</code>
</pre>
</div>
Use your own style
This plugin use gruvbox-dark as default style.
You can wirte your own style or see highlight.js demo. And then import your css file in Vue project entry.