Highlight.js plugin for Vue.js 2.0
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github
dist
src
test
.babelrc
.gitattributes
.gitignore
.prettierrc
.travis.yml
LICENSE
README.md
appveyor.yml
package-lock.json
package.json
rollup.config.js

README.md

Build Status Build status Coverage Status GitHub stars MITLicence

NPM

vue-hljs

Install

npm install vue-hljs --save

Useage

import Vue from "vue";
import vueHljs from "vue-hljs";
//if you want to use default color, import this css file
import "vue-hljs/dist/vue-hljs.min.css";

//use
Vue.use(vueHljs)
<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.