Hugo: Notes release notes 0.65

Created on 15 Feb 2020  路  12Comments  路  Source: gohugoio/hugo

I will update the docs (promise!), but here are a list of the main changes/fixes in this release. Also see the referenced issues.


  • Any branch node can now bundle resources (images, data files etc.), even the taxonomy nodes (e.g. /categories)
  • List pages (sections and the home page) can now be added to taxonomies.
  • draft, publishDate, expiryDate etc. now also works for list pages, and is recursive.
  • New _build meta keyword in front matter. See BuildConfig below. headless still works, but this is more general as it works for any page and is obviously more flexible. Can, of course, be set in a cascadeblock. Setting PublishResources=false will turn off auto-publishing of bundled resources (e.g. image originals).
  • .GetPage "members.md" (the Page method) will now only do relative lookups, which is what most people would expect.

    • A slight change of how disableKinds for regular pages: They will not be rendered on its own, but will be added to the site collections.

  • We have upgraded to the latest LibSass (v3.6.3). Nothing remarkable functional new here, but it makes Hugo ready for the upcoming Dart Backport.
  • https://gohugo.io/commands/hugo_mod/#see-also
    Some relevant fixed issues: #6312 #6087 #6738 #6412 #6743 #6875 #6034 #6902 #6173 #6590
type BuildConfig struct {
    // Whether to add it to any of the page collections.
    // Note that the page can still be found with .Site.GetPage.
    List bool // Default true

    // Whether to render it.
    Render bool // Default true

    // Whether to publish its resources. These will still be published on demand,
    // but enabling this can be useful if the originals (e.g. images) are
    // never used.
    PublishResources bool // Default true
}

The above would fits into a content file with YAML front matter:

---
title: Nothing
_build:
  list: false
  render: false
  publishResources: false
---

All 12 comments

I see a couple of differences in taxonomies:

  1. term pages' parent seem to be directly the home page in v0.65 (compare https://github.com/baldowl/hugo-0.64.1-vs-0.65-dev/blob/master/public-hugo-0.64.1/tags/a-tag/index.html with https://github.com/baldowl/hugo-0.64.1-vs-0.65-dev/blob/master/public-hugo-0.65-dev/tags/a-tag/index.html; navigation was generated by https://github.com/baldowl/hugo-0.64.1-vs-0.65-dev/blob/master/layouts/partials/breadcrumb.html);
  2. taxonomies' RSS feeds seem to be empty (compare https://github.com/baldowl/hugo-0.64.1-vs-0.65-dev/blob/master/public-hugo-0.64.1/tags/index.xml with https://github.com/baldowl/hugo-0.64.1-vs-0.65-dev/blob/master/public-hugo-0.65-dev/tags/index.xml; generated by Hugo's internal RSS template).

Thanks @baldowl -- much appreciated.

Didn't got too far :

~/go/bin/hugo  -v --debug
Total in 4 ms
Error: from config: failed to resolve output format "RSS" from site config
disableKinds = ["taxonomy", "taxonomyTerm", "RSS"]

# Pour g茅n茅rer le _redirects pour Netlify avec /layout/index.redir
[outputs]
home = [ "HTML", "RSS", "REDIR", "HEADERS" ]

If I use only disableKinds = ["taxonomy", "taxonomyTerm"] it works as usual.

PS : Beside this all my site works flawlessly and speed improved too.

Action | FR | EN | NL
Pages | 35 | 33 | 33
Paginator pages | 2 | 2 | 2
Non-page files | 0 | 0 | 0
Static files | 92 | 92 | 92
Processed images | 224 | 0 | 0
Aliases | 4 | 1 | 1
Sitemaps | 2 | 1 | 1
Cleaned | 0 | 0 | 0

v 0.61.0 : Total in 876 ms
v 0.65.0-DEV : Total in 535 ms

Thanks, @divinerites -- I'll fix the RSS issue. The background is a consolidation of RSS as both a "page kind" and an output format. Conceptually it should be disabled by defining outputs to not include it, but we should be backwards compatible, of course.

In your case you have what I would call a "conflicting config": You have disabled RSS, but yet you say you want the home page in RSS ... I digree, I'll fix it.

You have disabled RSS, but yet you say you want the home page in RSS

Oh .... that is stupid from my side !!! Thanks for pointing it.

I confirm that your fix https://github.com/gohugoio/hugo/commit/da54787cfa97789624e467a4451dfeb50f563e41 works fine on my sites if they have the conflicting configuration. Thanks.

I am still seeing the problem from #6173 .

If the main _index.md doesn't exist, the PT version can't access the Resource and just outputs (unknown)

I'm a bit confused by the new BuildConfig and the option to omit bundled resources: if publishResources is false, when is a resource published?

Using a simple-minded shortcode like {{ (.Page.Resources.GetMatch (.Get 0)).RelPermalink }} I get the expected string, but the referenced resource (which is not an image) isn't copied to the destination dir.

when is a resource published?

When you access one of the methods that require it to be published (e.g. .RelPermalink). I will do a double check that this is actually the case ... I may have a hole in the test coverage in this case.

@baldowl OK, I had a test for this, but the test was wrong (and very limited) -- this should be fixed now. Thanks for the report.

Not sure if it is a hint for a glitch/bug, but my code gives some differences between 0.61.0 & 0.65.0.
So just in case.
And I can't find a way to check what pages are generated ("hugo list" only the blogs).

$ hugo --gc --cleanDestinationDir
| FR | EN | NL
+------------------+-----+----+----+
Pages | 24 | 22 | 22
Paginator pages | 2 | 2 | 2
Non-page files | 0 | 0 | 0
Static files | 92 | 92 | 92
Processed images | 225 | 0 | 0
Aliases | 4 | 1 | 1
Sitemaps | 2 | 1 | 1
Cleaned | 0 | 0 | 0
Total in 898 ms

$ ~/go/bin/hugo --gc --cleanDestinationDir
| FR | EN | NL
-------------------+-----+----+-----
Pages | 23 | 21 | 21
Paginator pages | 2 | 2 | 2
Non-page files | 0 | 0 | 0
Static files | 92 | 92 | 92
Processed images | 225 | 0 | 0
Aliases | 4 | 1 | 1
Sitemaps | 2 | 1 | 1
Cleaned | 0 | 0 | 0

Will keep investigating.

Forget it. It is a different behaviour with "draft = true" on `_index.html". So this behaviours is correct. Sorry for the noise.

Was this page helpful?
0 / 5 - 0 ratings