diff --git a/.github/workflows/ci-build-test-site.yml b/.github/workflows/ci-build-test-site.yml index d7884a17..fc7a857e 100644 --- a/.github/workflows/ci-build-test-site.yml +++ b/.github/workflows/ci-build-test-site.yml @@ -98,5 +98,5 @@ jobs: extended: true - name: Build - run: hugo --minify --panicOnWarning --templateMetrics --templateMetricsHints + run: hugo --minify --templateMetrics --templateMetricsHints working-directory: test diff --git a/modules/blox-tailwind/layouts/_partials/functions/logger.html b/modules/blox-tailwind/layouts/_partials/functions/logger.html index ddf16084..98c23ea8 100644 --- a/modules/blox-tailwind/layouts/_partials/functions/logger.html +++ b/modules/blox-tailwind/layouts/_partials/functions/logger.html @@ -5,7 +5,7 @@ - adapter: optional bool to force adapter-safe mode (e.g., from _content.gotmpl) */}} {{- $level := lower (.level | default "warn") -}} -{{- $msg := (.message | default "" | string) -}} +{{- $msg := .message | default "" -}} {{- $page := .page | default . -}} {{- $forceAdapter := .adapter | default false -}} {{- $isDev := or hugo.IsServer (eq hugo.Environment "development") -}} @@ -35,31 +35,17 @@ {{- end -}} -{{/* Ensure message is safely converted to string */}} -{{- $safeMsg := "" -}} -{{- if $msg -}} - {{- $safeMsg = ($msg | string | replaceRE "%" "%%" | replaceRE "\n" " " | replaceRE "\t" " ") -}} -{{- end -}} - {{- if eq $level "error" -}} {{- if not $isAdapter -}} - {{- if $safeMsg -}} - {{- errorf $safeMsg -}} - {{- else -}} - {{- errorf "HBX: Empty error message" -}} - {{- end -}} + {{- errorf "%s" $msg -}} {{- else -}} - {{- if $isDev -}}{{- end -}} + {{- if $isDev -}}{{- end -}} {{- end -}} {{- else -}} {{- if not $isAdapter -}} - {{- if $safeMsg -}} - {{- warnf $safeMsg -}} - {{- else -}} - {{- warnf "HBX: Empty warning message" -}} - {{- end -}} + {{- warnf "%s" $msg -}} {{- else -}} - {{- if $isDev -}}{{- end -}} + {{- if $isDev -}}{{- end -}} {{- end -}} {{- end -}} {{- "" -}}