Convert site to Hugo (#8316)
This commit converts content and layout to use Hugo.
This commit is contained in:
committed by
k8s-ci-robot
parent
7745f0e0c5
commit
7f3b633aa0
@@ -0,0 +1,21 @@
|
||||
<div style="margin-top: 10px; margin-bottom: 10px;">
|
||||
{{ $for_k8s_version := .for_k8s_version | default (.page.Param "version") }}
|
||||
{{ $width := .width | default "600" }}
|
||||
{{ $state := .state }}
|
||||
<b>FEATURE STATE:</b> <code>Kubernetes {{ $for_k8s_version }}</code>
|
||||
{{/* docs/templates is a Hugo page bundle */}}
|
||||
{{ $templates_path := "docs/templates" }}
|
||||
{{ $templates := .page.Site.GetPage "page" $templates_path }}
|
||||
{{ with $templates.Resources }}
|
||||
{{ $template_path := printf "**feature-state-%s*" $state }}
|
||||
{{ $content_template := .GetMatch $template_path }}
|
||||
{{ with $content_template }}
|
||||
{{ $dialog := dict "page" $content_template "for_k8s_version" $for_k8s_version "width" $width }}
|
||||
{{ partial "templates/feature-dialog.html" $dialog }}
|
||||
{{ else }}
|
||||
{{ errorf "[%s] template not found in %s" .page.Site.Language.Lang $template_path }}
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ errorf "[%s] templates not found in docs/templates" .page.Site.Language.Lang }}
|
||||
{{ end }}
|
||||
</div>
|
||||
Reference in New Issue
Block a user