There are several conditions that can produce errors in your published site which are not detected during the build. Run this audit before your final build.
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 # Environment variables # HUGO_MINIFY_TDEWOLFF_HTML_KEEPCOMMENTS=true Retain HTML comments even if minification is enabled. This takes precedence over minify.tdewolff.html.keepComments in the site configuration.
...
Command line # Enable console logging with the --logLevel command line flag.
Hugo has four logging levels:
error Display error messages only. hugo --logLevel error warn Display warning and error messages. hugo --logLevel warn info Display information, warning, and error messages. hugo --logLevel info debug Display debug, information, warning, and error messages. hugo --logLevel debug If you do not specify a logging level with the --logLevel flag, warnings and errors are always displayed.
...
Use the [debug.Dump] function to inspect a data structure:
<pre>{{ debug.Dump .Params }}</pre> { "date": "2023-11-10T15:10:42-08:00", "draft": false, "iscjklanguage": false, "lastmod": "2023-11-10T15:10:42-08:00", "publishdate": "2023-11-10T15:10:42-08:00", "tags": [ "foo", "bar" ], "title": "My first post" } Use the [printf] function (render) or [warnf] function (log to console) to inspect simple data structures. The layout string below displays both value and data type.
{{ $value := 42 }} {{ printf "%[1]v (%[1]T)" $value }} → 42 (int)
When a project deprecates something, they are telling its users:
Don’t use Thing One anymore. Use Thing Two instead. We’re going to remove Thing One at some point in the future. Common [reasons for deprecation]:
A feature has been replaced by a more powerful alternative. A feature contains a design flaw. A feature is considered extraneous, and will be removed in the future in order to simplify the system as a whole.
...
Virus scanning # Virus scanners are an essential component of system protection, but the performance impact can be severe for applications like Hugo that frequently read and write to disk. For example, with Microsoft Defender Antivirus, build times for some sites may increase by 400% or more.
Before building a site, your virus scanner has already evaluated the files in your project directory. Scanning them again while building the site is superfluous.
...
Hugo’s [forum] is an active community of users and developers who answer questions, share knowledge, and provide examples. A quick search of over 20,000 topics will often answer your question. Please be sure to read about [requesting help] before asking your first question.
These are just a few of the questions most frequently asked by new users.
An error message indicates that a feature is not available. Why? # When you attempt to use a feature that is not available in the edition that you installed, Hugo throws this error:
...