2022-07-22 20:39:49 +00:00
|
|
|
import "focus-visible";
|
|
|
|
import bash from "highlight.js/lib/languages/bash";
|
|
|
|
import hljs from "highlight.js/lib/core";
|
|
|
|
import ini from "highlight.js/lib/languages/ini";
|
|
|
|
import javascript from "highlight.js/lib/languages/javascript";
|
|
|
|
import php from "highlight.js/lib/languages/php";
|
|
|
|
import yaml from "highlight.js/lib/languages/yaml";
|
2021-06-30 07:00:00 +00:00
|
|
|
|
2022-07-22 20:39:49 +00:00
|
|
|
hljs.registerLanguage("bash", bash);
|
|
|
|
hljs.registerLanguage("ini", ini);
|
|
|
|
hljs.registerLanguage("javascript", javascript);
|
|
|
|
hljs.registerLanguage("php", php);
|
|
|
|
hljs.registerLanguage("yaml", yaml);
|
2021-06-30 07:00:00 +00:00
|
|
|
|
2022-07-22 20:39:49 +00:00
|
|
|
document.addEventListener("DOMContentLoaded", (event) => {
|
|
|
|
document.querySelectorAll("pre code").forEach((element) => {
|
|
|
|
hljs.highlightElement(element);
|
|
|
|
});
|
|
|
|
});
|