Add Gruvbox share theme + blog system for Trilium (anonymized)
Blog generator, publish manager, share scripts, theme CSS, highlight.js bundles, font, favicon, templates and generated-reference outputs, plus an English installation guide.
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
<script>
|
||||
(function () {
|
||||
var codes = document.querySelectorAll("#content pre code:not(.language-mermaid)");
|
||||
if (!codes.length) return;
|
||||
|
||||
function apply() {
|
||||
if (!window.hljs) return;
|
||||
codes.forEach(function (c) {
|
||||
c.classList.add("hljs");
|
||||
hljs.highlightElement(c);
|
||||
if (window.hljs.lineNumbersBlock) {
|
||||
hljs.lineNumbersBlock(c);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function loadPlugin() {
|
||||
if (window.hljs && window.hljs.lineNumbersBlock) { apply(); return; }
|
||||
var s = document.createElement("script");
|
||||
s.src = "api/notes/__HLJS_LN_ID__/download";
|
||||
s.onload = apply;
|
||||
document.head.appendChild(s);
|
||||
}
|
||||
|
||||
if (window.hljs) { loadPlugin(); return; }
|
||||
|
||||
var s = document.createElement("script");
|
||||
s.src = "api/notes/__HLJS_ID__/download";
|
||||
s.onload = loadPlugin;
|
||||
document.head.appendChild(s);
|
||||
})();
|
||||
</script>
|
||||
Reference in New Issue
Block a user