fix template auto-formatting

uci-hugo-doc
Robert Kaussow 2022-02-22 21:45:14 +01:00
parent f3e1ffdddc
commit a4d1f51b1b
No known key found for this signature in database
GPG Key ID: 4E692A2EAECC03C0
3 changed files with 10 additions and 6 deletions

View File

@ -26,7 +26,7 @@ f(x) = \int_{-\infty}^\infty\hat f(\xi)\,e^{2 \pi i \xi x}\,d\xi
{{< /columns >}}
KaTeX can also be used inline, for example {{< katex >}}\pi(x){{< /katex >}} or used with a `display` setting. for example `display: block`:
KaTeX can also be used inline, for example {{< katex >}}\pi(x){{< /katex >}} or used with the `display` parameter (e.g. `display: block`):
<!-- spellchecker-disable -->
<!-- prettier-ignore -->

View File

@ -1,12 +1,14 @@
<!-- prettier-ignore-start -->
{{ if not (.Page.Scratch.Get "katex") }}
<!-- Include katext only first time -->
<!-- Include katex only first time -->
<link
rel="stylesheet"
href="{{ index (index .Site.Data.assets "katex.css") "src" | relURL }}"
/><script defer src="{{ index (index .Site.Data.assets "katex.js") "src" | relURL }}"></script>
/>
<script defer src="{{ index (index .Site.Data.assets "katex.js") "src" | relURL }}"></script>
{{ .Page.Scratch.Set "katex" true }}
{{ end }}
<!-- prettier-ignore-end -->
<span class="gdoc-katex katex{{ with .Get "class" }}{{ . }}{{ end }}">
{{ cond (in .Params "display") "\\[" "\\(" -}}

View File

@ -1,8 +1,10 @@
<!-- prettier-ignore-start -->
{{ if not (.Page.Scratch.Get "mermaid") }}
<!-- Include mermaid only first time --><script defer src="{{ index (index .Site.Data.assets "mermaid.js") "src" | relURL }}"></script>
<!-- Include mermaid only first time -->
<script defer src="{{ index (index .Site.Data.assets "mermaid.js") "src" | relURL }}"></script>
{{ .Page.Scratch.Set "mermaid" true }}
{{ end }}
<!-- prettier-ignore-end -->
<pre class="gdoc-mermaid mermaid{{ with .Get "class" }}{{ printf " %s" . }}{{ end }}">
{{- .Inner -}}