create static docs site with module options

This commit is contained in:
Bryton Hall 2022-08-28 15:22:43 -04:00 committed by GitHub
parent e3127e8c14
commit e75b801a31
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 448 additions and 19 deletions

View file

@ -0,0 +1,22 @@
{{ $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 }}