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,14 @@
|
||||
{{/* We need to initialize the shortcode's page's content. This is a very special construct. We are building page blocks by setting state on the Page,
|
||||
but we are not accessing its content. The .Content is lazily loaded in Hugo, so we must invoke that method before we do anything else. */}}
|
||||
{{ if .page.Content }}{{ end }}
|
||||
{{- $capture := printf "__cid_%s" .block -}}
|
||||
{{- $block := .page.Scratch.Get $capture -}}
|
||||
{{- if and (not $block) (not $.optional) -}}
|
||||
{{ partial "templates/errorthrower.html" (dict "block" .block "heading" .heading "purpose" .purpose) . }}
|
||||
{{- end -}}
|
||||
{{- with $block -}}
|
||||
{{- with $.heading }}
|
||||
<h2 id="{{ . | anchorize }}">{{ . }}</h2>
|
||||
{{ end -}}
|
||||
{{ . }}
|
||||
{{ end -}}
|
||||
Reference in New Issue
Block a user