UNCLASSIFIED - NO CUI

Skip to content

Update dependency gohugoio/hugo to v0.92.0

renovate requested to merge renovate/gohugoio-hugo-0.x into development

This MR contains the following updates:

Package Type Update Change
gohugoio/hugo ironbank-github minor v0.91.2 -> v0.92.0
gohugoio/hugo minor v0.91.2 -> v0.92.0

Release Notes

gohugoio/hugo

v0.92.0

Compare Source

Hugo 0.92.0 is mostly a release to prepare for some cool stuff coming in the next releases. Most notable are the deprecation updates:

  • The .Page methods marked as deprecated in Hugo 0.55 are now removed. They have been logged as an ERROR for a long time now and you will still get a clear error if you use them.
  • The support for MMark as a Markdown engine is removed. That has been marked as deprecated for a long time, and the upstream library is also deprecated and unmaintained.
  • If you use .Path on a Page that is backed by a file, you will now get a warning. More on that below.

The .Path method on Page works like before. But that method currently has a little vague specification – it behaves a little different if backed by a file. In Hugo 0.93 we're going to introduce a canonical content path, and to prepare for that change, you may see this in your log:

WARN 2022/01/12 10:23:37 .Path when the page is backed by a file is deprecated and will be removed in a future release. We plan to use Path for a canonical source path and you probably want to check the source is a file. To get the current behaviour, you can use a construct simlar to the below:

  {{ $path := "" }}
  {{ with .File }}
	{{ $path = .Path }}
  {{ else }}
	{{ $path = .Path }}
  {{ end }}

Re-run Hugo with the flag --panicOnWarning to get a better error message.

.Path is commonly used to create links to the source on GitHub – and that obviously only works for files, so you, as suggested above, may want to check if it's a file first.

Note that the --panicOnWarning flag is a new flag in this release and works for all warnings – it will fail fast on the first warning and point to the line in question. This makes it much easier to pin-point the location.

But this release isn't all about technical upgrades. We have also added a new hugo.Deps template function. We have already a way to list the Hugo Modules dependencies from the command line (hugo mod graph), but we thought it would be useful to also record this into your rendered site. An example of a "dependency table" in HTML may look like this:

<h2>Dependencies</h2>
<table class="table table-dark">
    <thead>
    <tr>
        <th scope="col">#</th>
        <th scope="col">Owner</th>
        <th scope="col">Path</th>
        <th scope="col">Version</th>
        <th scope="col">Time</th>
        <th scope="col">Vendor</th>
    </tr>
    </thead>
    <tbody>
    {{ range $i, $e := hugo.Deps }}
    <tr>
        <th scope="row">{{ add $i 1 }}</th>
        <td>{{ with .Owner }}{{.Path }}{{ end }}</td>
        <td>
        {{ .Path }}
        {{ with .Replace}}
        => {{ .Path }}
        {{ end }}
        </td>
        <td>{{ .Version }}</td>
        <td>{{ with .Time }}{{ . }}{{ end }}</td>
        <td>{{ .Vendor }}</td>
    </tr>
    {{ end }}
    </tbody>
</table>

This release represents 41 contributions by 4 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, @​ptgott, and @​roointan 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 9 contributions by 4 contributors. A special thanks to @​bep, @​jmooring, @​anarchivist, and @​davidsneighbour for their work on the documentation site.

Hugo now has:

Notes
Changes

Configuration

📅 Schedule: At any time (no schedule defined).

🚦 Automerge: Enabled.

Rebasing: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this MR and you won't be reminded about these updates again.


  • If you want to rebase/retry this MR, click this checkbox.

This MR has been generated by Renovate Bot.

Merge request reports