{{- 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 .HasShortcode "mermaid" }} {{- with resources.Get "js/mermaid-10.6.1.min.js" -}} {{- else -}} {{- errorf "No Mermaid helper script found" -}} {{- 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 -}}