重新启动mermaid图画模块,重新启用宋体

This commit is contained in:
JohnathanLin 2023-12-15 21:58:47 +08:00
parent b6ee24fb65
commit 3ccb4c0038
3 changed files with 12 additions and 3 deletions

View File

@ -0,0 +1,4 @@
<pre class="mermaid">
{{- .Inner | safeHTML }}
</pre>
{{ .Page.Store.Set "hasMermaid" true }}

View File

@ -35,6 +35,13 @@
</div>
{{- end }}
{{ if .Page.Store.Get "hasMermaid" }}
<script type="module">
import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.esm.min.mjs';
mermaid.initialize({ startOnLoad: true });
</script>
{{ end }}
<footer class="post-footer">
{{- $tags := .Language.Params.Taxonomies.tag | default "tags" }}
<ul class="post-tags">

View File

@ -1,4 +1,4 @@
<!-- 暂时不用宋体了
<style>
:root {
--sys-font-family: "Noto Serif SC";
@ -21,5 +21,3 @@
document.head.appendChild(customFont);
})();
</script>
-->