Convert site to Hugo (#8316)

This commit converts content and layout to use Hugo.
This commit is contained in:
Bjørn Erik Pedersen
2018-05-05 18:00:51 +02:00
committed by k8s-ci-robot
parent 7745f0e0c5
commit 7f3b633aa0
2327 changed files with 10928 additions and 171503 deletions
+14
View File
@@ -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 -}}