mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-09-03 12:12:39 +00:00
1d07b40d08
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.
17 lines
630 B
HTML
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 -}}
|