Files
FixIt/layouts/_partials/init/detection-encryption.html
T
Cell 1d07b40d08 refactor(layouts): remove Hugo Extended check, use warnidf for init warnings
SCSS now depends on Dart Sass (external) instead of Hugo Extended's
built-in LibSass, so the hugo.IsExtended check is no longer needed.
Also switches warnf to warnidf for encryption/pagefind warnings to
prevent duplicate messages.
2026-08-25 11:33:44 +08:00

17 lines
630 B
HTML

{{- /*
Encrypted pages detection partial.
Scans all regular pages for password-protected content and emits a build-time
warning listing encrypted pages with their titles and permalinks.
*/ -}}
{{- $encryptedPages := slice -}}
{{- range .Site.RegularPages -}}
{{- if or .Params.password (.Store.Get "hasEncryptor") -}}
{{- $encryptedPages = $encryptedPages | append (printf " • %s: %s" .Title .Permalink) -}}
{{- end -}}
{{- end -}}
{{- with $encryptedPages -}}
{{- warnidf "warning-encryption" "[FixIt] %s\n%s\n%s" (T "single.encryptionWarning") (delimit . "\n") (T "single.encryptionCommand") -}}
{{- end -}}