{{/* reference page-specific open graph image */}} {{- if ( eq .Section "blog" ) -}} {{ with findRE "" .Content 1 }} {{ end }} {{- else -}} {{- with resources.Get "images/kubernetes-horizontal-color.png" -}} {{- with resources.Copy "images/kubernetes-open-graph.png" . -}} {{- else -}} {{- warnf "No image. Boo." -}} {{- end -}} {{- end -}} {{- end -}} {{ range .Translations -}} {{ end -}} {{- if .HasShortcode "kubeweekly" -}} {{- end -}} {{- if or (.HasShortcode "table") (.HasShortcode "feature-gate-table") -}} {{- if hugo.IsProduction -}} {{- $sortableTableJs := resources.Get "js/sortable-table.js" | minify | fingerprint -}} {{- else -}} {{- $sortableTableJs := resources.Get "js/sortable-table.js" -}} {{- end -}} {{- end -}} {{- if .HasShortcode "cncf-landscape" -}} {{- end -}} {{- if .HasShortcode "figure" -}} {{- if hugo.IsProduction -}} {{- $zoomJs := resources.Get "js/zoom.js" | minify | fingerprint -}} {{- else -}} {{- $zoomJs := resources.Get "js/zoom.js" -}} {{- end -}} {{- end -}} {{- if eq .Layout "glossary" -}} {{- with resources.Get "js/glossary.js" -}} {{- else -}} {{- errorf "Unable to find the glossary helper script" -}} {{- end -}} {{- end -}} {{- if .HasShortcode "release-binaries" -}} {{- if hugo.IsProduction -}} {{- $releaseBinariesJs := resources.Get "js/release_binaries.js" | minify | fingerprint -}} {{- else -}} {{- $releaseBinariesJs := resources.Get "js/release_binaries.js" -}} {{- end -}} {{- end -}} {{/* JavaScript for announcements */}} {{- if hugo.IsProduction -}} {{- $bannerDismissJs := resources.Get "js/banner-dismiss.js" | minify | fingerprint -}} {{- else -}} {{- $bannerDismissJs := resources.Get "js/banner-dismiss.js" -}} {{- end -}} {{- if or (.HasShortcode "code_sample") (.HasShortcode "code") (.HasShortcode "codenew") -}} {{- end -}} {{- if eq (lower .Params.cid) "community" -}} {{- end -}} {{ with .Params.js }}{{ range (split . ",") }} {{ end }}{{ else }}{{ end }} {{- $legacyScriptJs := resources.Get "js/legacy-script.js" -}} {{/* theme_lock front-matter: pin a page to "light" or "dark" regardless of user preference. Useful for pages whose diagrams/figures only read correctly in one mode. */}} {{- with .Params.theme_lock -}} {{- $lock := . | lower -}} {{- if or (eq $lock "light") (eq $lock "dark") -}} {{- $themeLockJs := resources.Get "js/theme-lock.js" -}} {{- end -}} {{- end -}}