Site audit
Run this audit before deploying your production site.
Some conditions produce errors in your published site that Hugo does not detect during the build. Run this command before your final build to find them.
HUGO_MINIFY_TDEWOLFF_HTML_KEEPCOMMENTS=true HUGO_ENABLEMISSINGTRANSLATIONPLACEHOLDERS=true hugo && grep -inorE "<\!-- raw HTML omitted -->|ZgotmplZ|\[i18n\]|\(<nil>\)|(<nil>)|hahahugo" public/Tested with GNU Bash 5.1 and GNU grep 3.7.
Example output

Explanation
The command above uses these environment variables, grep options, and patterns.
Environment variables
HUGO_MINIFY_TDEWOLFF_HTML_KEEPCOMMENTS=true- Retain HTML comments even if minification is enabled. This takes precedence over
minify.tdewolff.html.keepCommentsin your project configuration. If you minify without keeping HTML comments, the audit cannot detect omitted raw HTML. HUGO_ENABLEMISSINGTRANSLATIONPLACEHOLDERS=true- Show a placeholder instead of the default value or an empty string when a translation is missing. This takes precedence over
enableMissingTranslationPlaceholdersin your project configuration.
Grep options
-i, --ignore-case- Ignore case distinctions in patterns and input data, so that characters that differ only in case match each other.
-n, --line-number- Prefix each line of output with the 1-based line number within its input file.
-o, --only-matching- Print only the matched, non-empty parts of a matching line, with each part on a separate output line.
-r, --recursive- Read all files under each directory, recursively, following symbolic links only if they are on the command line.
-E, --extended-regexp- Interpret patterns as extended regular expressions.
Patterns
<!-- raw HTML omitted -->- By default, Hugo removes raw HTML from your Markdown before rendering, and leaves this HTML comment in its place.
ZgotmplZ- A special value that indicates that unsafe content reached a CSS or URL context at runtime, as described in the documentation for Go’s
html/templatepackage. [i18n]- The placeholder that Hugo renders instead of the default value or an empty string when a translation is missing.
(<nil>)- The string that Hugo renders when you pass a
nilvalue to thefmt.Printffunction. (<nil>)- The escaped form of the previous pattern. Hugo renders this string when you do not pass the value returned by the
fmt.Printffunction through thesafe.HTMLfunction.
HAHAHUGO- Under certain conditions, a rendered shortcode may include all or part of the string HAHAHUGOSHORTCODE in uppercase or lowercase. This is difficult to detect in all cases, but a case-insensitive search of the output for
HAHAHUGOis likely to find most of them without producing false positives.
Last updated:
November 23, 2026
:
content: Apply style guide to troubleshooting pages (735740488)
Improve this page