huge upgrade to theme and pagefind search bar.

This commit is contained in:
2026-04-17 13:28:48 -06:00
parent a6a38f7ea7
commit 235d40da0b
442 changed files with 18933 additions and 2893 deletions

View File

@@ -0,0 +1,9 @@
{{- $attributes := .Attributes -}}
{{- $class := printf "book-hint %s" ($.AlertType | lower) -}}
{{- if isset $attributes "class" -}}
{{- $class = printf "%s %s" $class (index $attributes "class") -}}
{{ end -}}
{{- $attributes = merge $attributes (dict "class" $class) -}}
<blockquote {{ range $key, $value := $attributes }}{{printf "%s='%s'" $key $value | safeHTMLAttr}}{{ end }}>
{{ .Text -}}
</blockquote>

View File

@@ -0,0 +1,13 @@
{{- with .Inner -}}
<span>\[ {{ .| htmlEscape | safeHTML }} \]</span>
{{- end -}}
{{- if not (.Page.Store.Get "katex") -}}
{{- /* Include katex only first time */ -}}
<link rel="stylesheet" href="{{ "katex/katex.min.css" | relURL }}" />
{{- /* remove whitespaces */ -}}
<script defer src="{{ "katex/katex.min.js" | relURL }}"></script>
{{- with resources.Get "katex.json" | minify -}}
<script defer src="{{ "katex/auto-render.min.js" | relURL }}" onload="renderMathInElement(document.body, {{ .Content | safeJS }});"></script>
{{- end -}}
{{- .Page.Store.Set "katex" true -}}
{{- end -}}

View File

@@ -0,0 +1,10 @@
{{- /* remove whitespaces */ -}}
<pre class="mermaid">{{ .Inner | htmlEscape | safeHTML -}}</pre>
{{- if not (.Page.Store.Get "mermaid") -}}
{{- /* Include mermaid only first time */ -}}
<script src="{{ "mermaid.min.js" | relURL }}"></script>
{{- with resources.Get "mermaid.json" | minify -}}
<script>mermaid.initialize({{ .Content | safeJS }})</script>
{{- end -}}
{{- .Page.Store.Set "mermaid" true -}}
{{- end -}}

View File

@@ -0,0 +1,10 @@
{{- with (index .Attributes "filename") -}}
{{- $href := index $.Attributes "href" -}}
{{- if $href -}}
{{- $href = partial "docs/links/portable-link" (dict "Page" $.PageInner "Destination" $href) -}}
{{- end -}}
<div class="book-codeblock-filename">
<a {{ with $href }}href="{{ . }}"{{ end }}>{{ . }}</a>
</div>
{{- end -}}
{{- (transform.HighlightCodeBlock . .Options).Wrapped -}}

View File

@@ -0,0 +1,6 @@
<h{{ .Level }} id="{{ .Anchor }}" {{- with .Attributes.class -}}class="{{ . }}"{{- end -}}>
{{- .Text -}}
{{- if default true .Attributes.anchor -}}
<a class="anchor" href="#{{ .Anchor }}">#</a>
{{- end -}}
</h{{ .Level }}>

View File

@@ -0,0 +1,6 @@
{{- $destination := .Destination -}}
{{- if .Page.Site.Params.BookPortableLinks -}}
{{- $destination = partial "docs/links/portable-image" . -}}
{{- end -}}
<img src="{{ $destination | safeURL }}" alt="{{ .Text }}" {{ with .Title }}title="{{ . }}"{{ end }}/>
{{- /**/ -}}

View File

@@ -0,0 +1,6 @@
{{- $destination := .Destination -}}
{{- if .Page.Site.Params.BookPortableLinks -}}
{{- $destination = partial "docs/links/portable-link" . -}}
{{- end -}}
<a href="{{ $destination | safeURL }}"{{ with .Title}} title="{{ . }}"{{ end }}>{{ .Text | safeHTML }}</a>
{{- /**/ -}}