Hugo is fast, but ineffecinet templates can make it slower. For checking the performance you can use the below commands.
Use hugo --logLevel debug to display debug information, warning, and error message.
Use hugo --templateMetrics to check for slow templates. This will show the time it takes to render each template.
Use hugo --gc (garbage collection) to clean up unused files, which might help reduce build time.
Use debug.Timer to determine the execution time of a block of code. And use the hugo --logLevel info info command line flag when you build the site.
{{ $t := debug.Timer "TestSqrt" }}
{{ range seq 2000 }}
{{ $f := math.Sqrt . }}
{{ end }}
{{ $t.Stop }}
References
Hugo Docs
This website contains various types of blogs, both technical and non-technical, that can be accessed through the variuos links. I wanted to have a single …
This website is built with Hugo, a static site generator that uses Markdown for writing content files...
If you are using Hugo as your static site generator, you might want to create a card shortcode that can display different types of information on your blog …
Writings comments in the code will help you and anyone who reads the code by giving more readability and understandings.
Shortcodes are simple snippets inside your content files calling built-in or custom templates.
Lightbi is a sleek blog theme for Hugo, the fast static site generator. It's thoughtfully designed for a smooth and elegant blogging experience.
Lightbi is a modern, elegant Hugo theme focused on readability, performance, and content-first design.
Lightbi is a sleek blog theme for Hugo, the fast static site generator. It's thoughtfully designed for a smooth and elegant blogging experience.
In this blog, I’ll introduce Hugo, a fast and flexible static site generator. We’ll cover how to install it and create your first blog step by step.