重新启动mermaid图画模块,重新启用宋体
This commit is contained in:
parent
b6ee24fb65
commit
3ccb4c0038
4
layouts/_default/_markup/render-codeblock-mermaid.html
Normal file
4
layouts/_default/_markup/render-codeblock-mermaid.html
Normal file
@ -0,0 +1,4 @@
|
||||
<pre class="mermaid">
|
||||
{{- .Inner | safeHTML }}
|
||||
</pre>
|
||||
{{ .Page.Store.Set "hasMermaid" true }}
|
@ -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">
|
||||
|
@ -1,4 +1,4 @@
|
||||
<!-- 暂时不用宋体了
|
||||
|
||||
<style>
|
||||
:root {
|
||||
--sys-font-family: "Noto Serif SC";
|
||||
@ -21,5 +21,3 @@
|
||||
document.head.appendChild(customFont);
|
||||
})();
|
||||
</script>
|
||||
-->
|
||||
|
Loading…
x
Reference in New Issue
Block a user