Hugo: Use the tool build by the project on OpenBSD

Article published the ; modified the
3 minutes to read

This article has 442 words.
RAW source of the article:
Commit version: e21600e


It’s really easy to use, without troubles, Hugo on OpenBSD.

To install the package: # pkg_add hugo

  • Hugo version: 0.53 : Hugo Static Site Generator v0.53 openbsd/amd64 BuildDate: unknown
  • OpenBSD: 6.6
  • Architecture: amd64

But, this version is more year old, and has a lot of bugs.


The Hugo project build releases to download and uncompress; there are 3 files, the binary hugo, and files LICENSE, README.md.

The archives are intended for 32-bits (i386), 64-bits (amd64), and ARM architectures.


The purpose of this article is to “show up” the various pitfalls related to these official binaries, which sometimes generate changes in Hugo’s configuration, or even malfunctions.

The ultimage version really functionnal is: 0.59.1.

Importants Changes


  • version: Hugo Static Site Generator v0.54.0-B1A82C61 openbsd/amd64 BuildDate: 2019-02-01T09:41:10Z

In fact, hugo server not run, and exit with error: Error: Error building site: EOF



  • version: Hugo Static Site Generator v0.55.0-4333CC77 openbsd/amd64 BuildDate: 2019-04-08T16:41:18Z


  • versions 0.60.(x), 0.61.0, 0.62.(x)

Since version 0.60.0, there is a new engine: the goldmark.

It’s necessary to change your file configuration, as (for the toml format):

[markup.goldmark.renderer] unsafe = true

But, it exists this bug, in the rendering of HTML code within the shortcodes.

For the moment, prefer to use v0.59.1!


Page.Hugo is deprecated

This message Page.Hugo is deprecated and will be removed in a future release. Use the global hugo function. says .Hugo variable is deprecated.

You need to replace by the global hugo function.

See: Hugo Documentation: Variables > Hugo

This message Page's .RSSLink is deprecated and will be removed in a future release. Use the Output Format's link informs .RSSLink variable is deprecated.

Prefer to use: {{`` with .OutputFormats.Get "RSS" }}{{ .RelPermalink }}{{ end }}

See: Hugo Documentation: Templates > Output formats

Page’s .URL is deprecated

The message Page's .URL is deprecated and will be removed in a future release. Use .Permalink or .RelPermalink. notifies to stop using the .URL variable.

You need to replace by .Permalink.




It is therefore recommended that you no longer use the {{``% shortcode %}} syntax, but prefer {{``< shortcode >}} syntax and use the markdownify function.

See: Hugo Documentation: Functions > Markdownify .


Taxonomy nodes have a new accessor named .Page. It simplifies the use of differents variables, as .Titre.

Instead of using {{ range .Data.Terms.Alphabetical }}, use {{ range .Site.Taxonomies.tags }}.