github gohugoio/hugo v0.96.0

latest releases: v0.138.0, v0.137.1, v0.137.0...
2 years ago

Vertical merging of content mounts. The main topic of this release is about file mounts (see #9693). We have had a powerful and well defined merge strategy for the union filesystems for the Hugo Modules tree on the horizontal axis (left to right), but not so much for the vertical configuration within each module (e.g. multiple content mounts for the same language). It was @jmooring who pointed out how useful this could be, and even provided this example where missing translations gets filled in from other language(s):

#------------------------------------------------------------------------------
# Content mounts
#------------------------------------------------------------------------------

# EN content
[[module.mounts]]
source = 'content/en'
target = 'content'
lang = 'en'

# DE content
[[module.mounts]]
source = 'content/de'
target = 'content'
lang = 'de'

# NL content
[[module.mounts]]
source = 'content/nl'
target = 'content'
lang = 'nl'

#------------------------------------------------------------------------------
# Fill in the missing translations
#------------------------------------------------------------------------------

# This fills in the gaps in DE content with EN content
[[module.mounts]]
source = 'content/en'
target = 'content'
lang = 'de'

# This fills in the gaps in NL content with EN content.
[[module.mounts]]
source = 'content/en'
target = 'content'
lang = 'nl'

Also, we have added some details to the .Err object you get when resources.GetRemote fails, which can be useful when debugging errrors (see #9708). Not you can do something like:

{{ with $result := resources.GetRemote $url }}
  {{ with .Err }}
    {{ warnf "%s: %#v" .Error .Data}}
  {{ else }}
    {{ with .Content | unmarshal }}
      {{ warnf "%#v" . }}
    {{ end }}
  {{ end }}
{{ end }}

The .Data object above is a map and currently contains StatusCode, Status, Body, TransferEncoding, ContentLength, and ContentType.

This release represents 23 contributions by 8 contributors to the main Hugo code base.@bep leads the Hugo development with a significant amount of contributions, but also a big shoutout to @jmooring, @dependabot[bot], and @anthonyfok for their ongoing contributions.
And thanks to @digitalcraftsman for his ongoing work on keeping the themes site in pristine condition.

Many have also been busy writing and fixing the documentation in hugoDocs,
which has received 5 contributions by 3 contributors.

Hugo now has:

Notes

Changes

Don't miss a new hugo release

NewReleases is sending notifications on new releases.