about summary refs log tree commit diff stats
path: root/frontend
diff options
context:
space:
mode:
authorAlan Pearce2024-05-05 18:11:56 +0200
committerAlan Pearce2024-05-05 18:11:56 +0200
commit2430f46a9948b38b06880606a95dec357d01f619 (patch)
tree2d8e9078b99ade7e9fe339be805890c635f0e235 /frontend
parent158904f480e558ca00f680e7c577bb6329605eff (diff)
downloadsearchix-2430f46a9948b38b06880606a95dec357d01f619.tar.lz
searchix-2430f46a9948b38b06880606a95dec357d01f619.tar.zst
searchix-2430f46a9948b38b06880606a95dec357d01f619.zip
feat: render markdown in option descriptions
Diffstat (limited to 'frontend')
-rw-r--r--frontend/templates/blocks/options.gotmpl20
1 files changed, 12 insertions, 8 deletions
diff --git a/frontend/templates/blocks/options.gotmpl b/frontend/templates/blocks/options.gotmpl
index d5171c3..1172e52 100644
--- a/frontend/templates/blocks/options.gotmpl
+++ b/frontend/templates/blocks/options.gotmpl
@@ -1,28 +1,32 @@
 {{ define "results" }}
-  {{- range $opt, $data := .Results }}
-    <details id="{{ $opt }}">
+  {{- range .Results }}
+    <details id="{{ .Option }}">
       <summary>
-        {{ $opt }}
+        {{ .Option }}
       </summary>
       <p>
-        {{ $data.Description }}
+        {{ HTML .Description.HTML }}
       </p>
       <dl>
-        {{- with $data.Type }}
+        {{- with .Type }}
           <dt>Type</dt>
           <dd>{{ . }}</dd>
         {{- end }}
-        {{- with $data.Default }}
+        {{- with .Default }}
           <dt>Default</dt>
           <dd><code>{{ .Text }}</code></dd>
         {{- end }}
-        {{- with $data.Example }}
+        {{- with .Example }}
           {{- if .Text }}
             <dt>Example</dt>
             <dd><code>{{ .Text }}</code></dd>
           {{- end }}
         {{- end }}
-        {{- with $data.Declarations }}
+        {{- with .RelatedPackages.HTML }}
+          <dt>Related Packages</dt>
+          <dd>{{ . }}</dd>
+        {{- end }}
+        {{- with .Declarations }}
           <dt>Declared</dt>
           {{- range . }}
             <dd>