Troubleshoot
https://gohugo.io/troubleshooting/
The Troubleshooting section includes known issues, recent workarounds, and FAQs pulled from the Hugo Discussion Forum.
https://gohugo.io/troubleshooting/
The Troubleshooting section includes known issues, recent workarounds, and FAQs pulled from the Hugo Discussion Forum.
https://gohugo.io/troubleshooting/build-performance/
An overview of features used for diagnosing and improving performance issues in site builds.
Hugo is a very fast static site generator, but it is possible to write inefficient templates. Hugo’s template metrics feature is extremely helpful in pinpointing which templates are executed most often and how long those executions take in terms of CPU time.
| Metric Name | Description |
|---|---|
| cumulative duration | The cumulative time spent executing a given template. |
| average duration | The average time spent executing a given template. |
| maximum duration | The maximum time a single execution took for a given template. |
| count | The number of times a template was executed. |
| template | The template name. |
| |
A Note About Parallelism
Hugo builds pages in parallel where multiple pages are generated simultaneously. Because of this parallelism, the sum of “cumulative duration” values is usually greater than the actual time it takes to build a site.
Some partial templates such as sidebars or menus are executed many times during a site build. Depending on the content within the partial template and the desired output, the template may benefit from caching to reduce the number of executions. The partialCached template function provides caching capabilities for partial templates.
Note that you can create cached variants of each partial by passing additional parameters to partialCached beyond the initial context. See the partialCached documentation for more details.
https://gohugo.io/troubleshooting/faq/
Solutions to some common Hugo problems.
Note: The answers/solutions presented below are short, and may not be enough to solve your problem. Visit Hugo Discourse and use the search. It that does not help, start a new topic and ask your questions.
Is your Markdown file in draft mode? When testing, run hugo server with the -D or --buildDrafts switch.
Is your Markdown file part of a leaf bundle? If there is an index.md file in the same or any parent directory then other Markdown files will not be rendered as individual pages.
Yes you can! See Configure with Environment Variables.
publishDate in the page Front Matter to a datetime in the future. If you want the creation and publication datetime to be the same, it’s also sufficient to only set date1.How to automate the “publish at intervals” part depends on your situation:
If you deploy from your own PC/server, you can automate with Cron or similar.
If your site is hosted on a service similar to
Netlify
you can:
Also see this Twitter thread:
@GoHugoIO Converted https://t.co/icCzS7Ha7q from @Medium to Hugo yesterday. Once I figure out how to do scheduled posts I will be ecstatic.
— Chris Short 🇺🇸🇺🇦 (@ChrisShort)
February 10, 2018
Yes you can! Read this.
If you process SCSS or Sass to CSS in your Hugo project with libsass as the transpiler or if you convert images to the webp format, you need the Hugo extended version, or else you may see an error message similar to the below:
| |
We release two set of binaries for technical reasons. The extended version is not what you get by default for some installation methods. On the release page, look for archives with extended in the name. To build hugo-extended, use go install --tags extended
To confirm, run hugo version and look for the word extended.