all repos — searchix @ 2430f46a9948b38b06880606a95dec357d01f619

Search engine for NixOS, nix-darwin, home-manager and NUR users

feat: render markdown in option descriptions

Alan Pearce
commit

2430f46a9948b38b06880606a95dec357d01f619

parent

158904f480e558ca00f680e7c577bb6329605eff

1 file changed, 12 insertions(+), 8 deletions(-)

changed files
M frontend/templates/blocks/options.gotmplfrontend/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>