docs: fix links to nested submodule options

This commit is contained in:
Bryton Hall 2023-06-03 02:38:47 -04:00
parent 95504f4c3b
commit 14f867ec12

View file

@ -1,6 +1,12 @@
{{- $option := .Get 0 -}} {{- $option := .Get 0 -}}
{{- $module := index (strings.Split $option ".") 0 -}} {{- $module := index (strings.Split $option ".") 0 -}}
{{/* some modules are nested under other modules */}}
{{- $submodule := index (strings.Split $option ".") 1 -}}
{{- if eq "helm" $submodule -}}
{{ $module = "helm"}}
{{- end -}}
{{/* should we use markdown instead of html? some envs strip raw html */}} {{/* should we use markdown instead of html? some envs strip raw html */}}
{{- $md := .Get 1 | default false -}} {{- $md := .Get 1 | default false -}}
@ -8,4 +14,4 @@
[{{ $option }}](/modules/{{ $module }}/#{{ $option }}) [{{ $option }}](/modules/{{ $module }}/#{{ $option }})
{{- else -}} {{- else -}}
<a href="/modules/{{ $module }}/#{{ $option }}">{{ $option }}</a> <a href="/modules/{{ $module }}/#{{ $option }}">{{ $option }}</a>
{{- end -}} {{- end -}}