kubenix/docs/layouts/shortcodes/options.html
2022-08-28 15:22:43 -04:00

22 lines
No EOL
745 B
HTML

{{ $module := $.Page.File.BaseFileName }}
{{ $repo := $.Site.Params.BookRepo }}
{{ range $name, $option := .Site.Data.options }}
{{/* some module options are nested under others */}}
{{ if and (hasPrefix $name "kubernetes.helm.") }}
{{ if (eq $module "helm") }}
{{ partial "details" (dict "name" $name "option" $option "repo" $repo) }}
{{ end }}
{{ else }}
{{/* only show options for the current module */}}
{{/* but don't list _all_ kubernetes resources */}}
{{ if and
(not (hasPrefix $name "kubernetes.api.resources."))
(hasPrefix $name (print $module "."))
}}
{{ partial "details" (dict "name" $name "option" $option "repo" $repo) }}
{{ end }}
{{ end }}
{{ end }}