<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>troubleshooting on Hugo</title><link>https://v0-122-0--gohugoio.netlify.app/categories/troubleshooting/</link><description>Recent content in troubleshooting on Hugo</description><generator>Hugo -- gohugo.io</generator><language>en</language><atom:link href="https://v0-122-0--gohugoio.netlify.app/categories/troubleshooting/index.xml" rel="self" type="application/rss+xml"/><item><title>Site audit</title><link>https://v0-122-0--gohugoio.netlify.app/troubleshooting/audit/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/troubleshooting/audit/</guid><description>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 &amp;amp;&amp;amp; grep -inorE &amp;#34;&amp;lt;\!-- raw HTML omitted --&amp;gt;|ZgotmplZ|\[i18n\]|\(&amp;lt;nil&amp;gt;\)|(&amp;amp;lt;nil&amp;amp;gt;)|hahahugo&amp;#34; 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. If you minify without keeping HTML comments when performing this audit, you will not be able to detect when raw HTML has been omitted.</description></item><item><title>Logging</title><link>https://v0-122-0--gohugoio.netlify.app/troubleshooting/logging/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/troubleshooting/logging/</guid><description>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.</description></item><item><title>Data inspection</title><link>https://v0-122-0--gohugoio.netlify.app/troubleshooting/inspection/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/troubleshooting/inspection/</guid><description>Use the jsonify function to inspect a data structure:
&amp;lt;pre&amp;gt;{{ jsonify (dict &amp;#34;indent&amp;#34; &amp;#34; &amp;#34;) .Params }}&amp;lt;/pre&amp;gt; { &amp;#34;date&amp;#34;: &amp;#34;2023-11-10T15:10:42-08:00&amp;#34;, &amp;#34;draft&amp;#34;: false, &amp;#34;iscjklanguage&amp;#34;: false, &amp;#34;lastmod&amp;#34;: &amp;#34;2023-11-10T15:10:42-08:00&amp;#34;, &amp;#34;publishdate&amp;#34;: &amp;#34;2023-11-10T15:10:42-08:00&amp;#34;, &amp;#34;tags&amp;#34;: [ &amp;#34;foo&amp;#34;, &amp;#34;bar&amp;#34; ], &amp;#34;title&amp;#34;: &amp;#34;My first post&amp;#34; } Hugo will throw an error if you attempt to use the construct above to display context that includes a page collection. For example, in a home page template, this will fail:
{{ jsonify (dict &amp;quot;indent&amp;quot; &amp;quot; &amp;quot;) .</description></item><item><title>Deprecation</title><link>https://v0-122-0--gohugoio.netlify.app/troubleshooting/deprecation/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/troubleshooting/deprecation/</guid><description>When a project deprecates something, they are telling its users:
Don&amp;rsquo;t use Thing One anymore. Use Thing Two instead. We&amp;rsquo;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.</description></item><item><title>Performance</title><link>https://v0-122-0--gohugoio.netlify.app/troubleshooting/performance/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/troubleshooting/performance/</guid><description>Template metrics Hugo is fast, but inefficient templates impede performance. Enable template metrics to determine which templates take the most time, and to identify caching opportunities:
hugo --templateMetrics --templateMetricsHints The result will look something like this:
Template Metrics: cumulative average maximum cache percent cached total duration duration duration potential cached count count template ---------- -------- -------- --------- ------- ------ ----- -------- 36.037476822s 135.990478ms 225.765245ms 11 0 0 265 partials/head.html 35.920040902s 164.</description></item><item><title>Frequently asked questions</title><link>https://v0-122-0--gohugoio.netlify.app/troubleshooting/faq/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://v0-122-0--gohugoio.netlify.app/troubleshooting/faq/</guid><description>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? Hugo is available in two editions: standard and extended.</description></item></channel></rss>