mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-15 05:41:51 +00:00
fix(docs): hljs depcrecation and new directive
couldn't figure out how to get hljs-vue to work so this was just the easiest way to fix it
This commit is contained in:
parent
b28ca170ed
commit
9ee0378d4e
3 changed files with 11 additions and 2 deletions
|
@ -18,7 +18,7 @@
|
|||
elem.parentNode.classList.add('codeblock');
|
||||
}
|
||||
|
||||
hljs.highlightBlock(elem);
|
||||
hljs.highlightElement(elem);
|
||||
});
|
||||
}
|
||||
},
|
||||
|
|
8
dashboard/src/directives/highlightjs.ts
Normal file
8
dashboard/src/directives/highlightjs.ts
Normal file
|
@ -0,0 +1,8 @@
|
|||
import Vue from "vue";
|
||||
import hljs from "highlight.js/lib/core";
|
||||
|
||||
Vue.directive("highlightjs", {
|
||||
bind(el, binding) {
|
||||
hljs.highlightElement(el)
|
||||
},
|
||||
});
|
|
@ -4,13 +4,14 @@ import Vue from "vue";
|
|||
|
||||
import VueHighlightJS from "@highlightjs/vue-plugin";
|
||||
import hljs from "highlight.js/lib/core";
|
||||
import hljsYaml from "highlight.js/lib/languages/yaml.js";
|
||||
import hljsYaml from "highlight.js/lib/languages/yaml";
|
||||
import "highlight.js/styles/base16/ocean.css";
|
||||
|
||||
import { router } from "./routes";
|
||||
import { RootStore } from "./store";
|
||||
|
||||
import "./directives/trim-indents";
|
||||
import "./directives/highlightjs";
|
||||
|
||||
import App from "./components/App.vue";
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue