{{/* Comments include entry. - If functional cookie consent is required, render a placeholder + template and load commentsConsent.ts. - Otherwise, render provider partial directly. */}} {{ if .Site.Params.comments.enabled }} {{- $needsConsent := and .Site.Params.cookies.enabled .Site.Params.cookies.categories.functional -}} {{- if $needsConsent -}} {{/* Consent-gated comments - show placeholder until functional consent */}} {{- $opts := dict "minify" hugo.IsProduction -}} {{/* commentsConsent.ts is intentionally built and loaded here as an independent entry */}} {{- $commentsScript := resources.Get "ts/commentsConsent.ts" | js.Build $opts | fingerprint -}} {{- else -}} {{/* No consent required - load comments normally */}} {{ partial (printf "comments/provider/%s" .Site.Params.comments.provider) . }} {{- end -}} {{ end }}