Changelog History
Page 2
-
v0.76.0 Changes
October 06, 2020In Hugo 0.76.0 you can now have a list of cascade blocks per page and a new
_target
keyword where you can select which pages to cascade upon using Glob patterns for aPage
'sKind
,Lang
and/orPath
:title ="Blog"[[cascade]]background = "yosemite.jpg"[cascade.\_target]path="/blog/\*\*"lang="en"kind="page"[[cascade]]background = "goldenbridge.jpg"[cascade.\_target]kind="section"
Tasks that were earlier hard/borderline impossible to do are now simple. One common example would to apply a different template set to nested sections; you can now apply a custom
Type
to these sections usingpath="/blog/*/**"
and similar.π A related improvement is that the build option
render
is now an enum. In addition to turning on/off rendering of a given page you can tell Hugo to not render, but you want to preserve the.Permalink
, useful for SPA applications.This release represents 35 contributions by 8 contributors to the main Hugo code base.@dependabot[bot] leads the Hugo development with a significant amount of contributions, but also a big shoutout to @bep, @ai, and @jmooring for their ongoing contributions.
π And a big thanks to @digitalcraftsman for his relentless work on keeping the themes site in pristine condition and to @davidsneighbour, @coliff and @kaushalmodi for all the great work on the documentation site.π Many have also been busy writing and fixing the documentation in hugoDocs,
which has received 11 contributions by 6 contributors. A special thanks to @amdw, @davidsneighbour, @samrobbins85, and @yaythomas for their work on the documentation site.Hugo now has:
- 47025+ stars
- 438+ contributors
- 354+ themes
Notes
π§ We have added a
force
flag to the server redirects configuration, configuring whether to override any existing content in the path or not. This is inline with how Netlify does it.π§ This is set to default
false
. If you want the old behaviour you need to add this flag to your configuration:[[redirects]]from = "/myspa/\*\*"to = "/myspa/"status = 200force = true
β¨ Enhancements
Templates
- β Add Do Not Track (dnt) option to Vimeo shortcode edc5c474 @joshgerdes #7700
Other
- π Regen docshelper b9318e43 @bep
- π Make BuildConfig.Render an enum 63493890 @bep #7783
- π Allow cascade to be a slice with a _target discriminator c63db7f1 @bep #7782
- β Add force flag to server redirects config 5e2a547c @bep #7778
- β¬οΈ bump github.com/evanw/esbuild from 0.7.8 to 0.7.9 ee090c09 @dependabot[bot]
- β¬οΈ bump github.com/tdewolff/minify/v2 from 2.9.5 to 2.9.7 05e358fd @dependabot[bot]
- β¬οΈ bump github.com/aws/aws-sdk-go from 1.34.34 to 1.35.0 a2e85d9a @dependabot[bot]
- β¬οΈ bump github.com/getkin/kin-openapi from 0.22.0 to 0.22.1 4fba78dd @dependabot[bot]
- β¬οΈ bump github.com/aws/aws-sdk-go from 1.34.33 to 1.34.34 c011b466 @dependabot[bot]
- β¬οΈ bump github.com/evanw/esbuild from 0.7.7 to 0.7.8 35348b4b @dependabot[bot]
- β¬οΈ bump github.com/aws/aws-sdk-go from 1.34.27 to 1.34.33 34915777 @dependabot[bot]
- β¬οΈ bump github.com/evanw/esbuild from 0.7.4 to 0.7.7 0f4a837e @dependabot[bot]
- β¬οΈ bump github.com/tdewolff/minify/v2 from 2.9.4 to 2.9.5 b395d686 @dependabot[bot]
- β¬οΈ Upgrade to go-i18n v2 97987e5c @bep #5242
- β¬οΈ bump github.com/evanw/esbuild from 0.7.2 to 0.7.4 4855c186 @dependabot[bot]
- β¬οΈ bump github.com/aws/aws-sdk-go from 1.34.26 to 1.34.27 6f07ec7e @dependabot[bot]
- β¬οΈ bump github.com/alecthomas/chroma from 0.8.0 to 0.8.1 4318dc72 @dependabot[bot]
- β¬οΈ bump github.com/evanw/esbuild from 0.7.1 to 0.7.2 acdc27a3 @dependabot[bot]
- π Make sure CSS is rebuilt when postcss.config.js or tailwind.config.js changes 3acde9ae @bep #7715
- β¬οΈ bump github.com/aws/aws-sdk-go from 1.34.22 to 1.34.26 0bce9770 @dependabot[bot]
- β‘οΈ Update to github.com/tdewolff/minify v2.9.4 b254532b @bep
- β¬οΈ Bump bundled Node.js from v12.18.3 to v12.18.4 05a22892 @anthonyfok
- β Add preserveTOC option 8e553dcd @helfper
- β¬οΈ bump github.com/frankban/quicktest from 1.10.2 to 1.11.0 d4fc70a3 @dependabot[bot]
- β¬οΈ bump github.com/evanw/esbuild from 0.6.32 to 0.7.1 d905abc0 @dependabot[bot]
- β¬οΈ bump github.com/rogpeppe/go-internal from 1.5.1 to 1.6.2 8f394674 @dependabot[bot]
- β¬οΈ bump github.com/jdkato/prose from 1.1.1 to 1.2.0 b01b2564 @dependabot[bot]
- β¬οΈ bump github.com/spf13/afero from 1.2.2 to 1.4.0 9fa5ebe2 @dependabot[bot]
- π¦ Preserve the original package.json if it exists 214afe4c @bep #7690
π Fixes
Templates
Other
-
v0.75.1 Changes
September 15, 2020π This is a bug-fix release with a couple of important fixes.
-
v0.75.0 Changes
September 14, 2020Hugo
0.75.0
brings several improvements to Hugo Modules, a new CLI command to bridge the JavaScript dependencies into Hugo, a refresh of the versions of the most important upstream dependencies, and more.NPM Pack
π¦ The new CLI command is called
hugo mod npm pack
. We have marked it as experimental. It works great, go ahead and use it, but we need to test this out in real projects to get a feel of it; it is likely that it will change/improve in the upcoming versions of Hugo. The command creates a consolidatedpackage.json
from the project and all of its theme components. On version conflicts, the version closest to the project is selected. We may revise that strategy in the future (minimal version selection maybe?), but this should give both control and the least amount of surprise for the site owner.π So, why did we do this? JavaScript is often a background actor in a Hugo project, and it doesn't make sense to publish it to a NPM registry. The JS dependencies are mostly build tools (PostCSS, TailwindCSS, Babel),
devDependencies
. This has been working fine as long as you kept the JS config files (includingpackage.json
) in the project, adding duplication/work when using ready-to-use theme components. These tools work best when you have everything below a single file tree, which is very much different to how Hugo Modules work. An example of a module with TailwindCSS:tailwind-module βββ assets β βββ css βββ package.json βββ postcss.config.js βββ tailwind.config.js
If you included
tailwind-module
in a Hugo project and processed it withPostCSS
, this is what happened in earlier versions:- It used the directory where the
postcss.config.js
lives as a starting point to look for anyrequire
'd dependency. - π§ TailwindCSS would, on the other hand, load its configuration file relative to where
PostCSS
was invoked (the project directory).
π The above just doesn't work and here is the technical notes on how we have fixed this:
- π· The new
hugo mod npm pack
creates a consolidatedpackage.json
based on files namedpackage.hugo.json
it finds in the dependency tree (one is created for you the first time you run this command). The end result will always bepackage.json
, which works seamlessly withnpm install
invoked automatically by Netlify and other CI vendors. - The main project's
node_modules
folder is added to NODE_PATH when runningPostCSS
andBabel
. π§ We have introduced a new mount point
assets/_jsconfig
where we, by default, mount the JS configuration files that we're interested in. This is where Hugo will start looking for these files, and the files' filenames will also be available in the Node environment, so you can do:let tailwindConfig = process.env.HUGO_FILE_TAILWIND_CONFIG_JS || './tailwind.config.js';const tailwind = require('tailwindcss')(tailwindConfig);
Module Enhancements
- We have added a
noVendor
Glob pattern config to the module config d4611c43 @bep #7647. This allows you to only vendor a subset of your dependencies. - We have added
ignoreImports
option to module imports config 20af9a07 @bep #7646, which allows you to import a module and load its config, but not follow its imports. - π We have deprecated
--ignoreVendor
in favour of a--ignoreVendor
, a patch matching Glob pattern 9a1e6d15 @bep. A typical use for this would be when you have vendored your dependencies, but want to edit one of them.
Statistics
This release represents 79 contributions by 19 contributors to the main Hugo code base. @bep leads the Hugo development with a significant amount of contributions, but also a big shoutout to @dependabot[bot], @moorereason, and @jmooring for their ongoing contributions.
π And a big thanks to @digitalcraftsman for his relentless work on keeping the themes site in pristine condition and to @davidsneighbour, @coliff and @kaushalmodi for all the great work on the documentation site.π Many have also been busy writing and fixing the documentation in hugoDocs,
which has received 24 contributions by 15 contributors. A special thanks to @jmooring, @bep, @jornane, and @inwardmovement for their work on the documentation site.Hugo now has:
- 46596+ stars
- 438+ contributors
- 352+ themes
Notes
- π We now build with Go 1.15, which means that we no longer build release binaries for MacOS 32-bit.
- You may now get an error message about "error calling partial: partials that returns a value needs a non-zero argument.". This error situation was not caught earlier, and comes from a limitation in Go's templates: If you use the
return
keyword in a partial, the argument you pass to that partial (e.g. the ".") cannot be zero (and 0 and "" is considered a zero argument).
Templates
- π¨ Print layout name if it was specified when showing missing layout file error 9df60b62 @richtera #7617
- β Add limit support to replaceRE cdfd1c99 @moorereason #7586
- π Extend merge to accept multiple parameters 047af7cf @moorereason #7595
- β Add limit option to replace template function f9ebaaed @moorereason #7586
Output
Other
- Set PWD in environment when running the Node apps 377ad87a @bep
- already -> already 292b0e26 @dholbach
- π Regen docs helper be2404c8 @bep
- π Regenerate CLI docs c8da8eb1 @bep
- β Add "hugo mod npm pack" 85ba9bff @bep #7644#7656#7675
- β¬οΈ bump github.com/aws/aws-sdk-go from 1.34.21 to 1.34.22 4fad43c8 @dependabot[bot]
- β Add support to linkable line anchors on Chroma fb0f2cc7 @fjorgemota #7622
- β¬οΈ Bump bundled Node.js from v8.12.0 to v12.18.3 748fd4cb @anthonyfok #7278
- π Change confinement from strict to classic" b82f440c @anthonyfok
- β¬οΈ bump github.com/getkin/kin-openapi from 0.14.0 to 0.22.0 c8143efa @dependabot[bot]
- β¬οΈ bump github.com/aws/aws-sdk-go from 1.34.20 to 1.34.21 c80132bb @dependabot[bot]
- β¬οΈ bump github.com/spf13/viper from 1.6.1 to 1.7.1 75fa4c5c @dependabot[bot]
- β Run "go mod tidy" fd7969e0 @bep
- β‘οΈ Update to Goldmark v1.2.1 b7fa3c4b @bep
- β¬οΈ bump github.com/aws/aws-sdk-go from 1.27.1 to 1.34.20 746ba803 @dependabot[bot]
- β¬οΈ bump github.com/mitchellh/mapstructure from 1.1.2 to 1.3.3 612b7d37 @dependabot[bot]
- π Change confinement from strict to classic 6f4ff1a4 @anthonyfok
- β¬οΈ bump github.com/spf13/cobra from 0.0.5 to 0.0.7 ddeca459 @dependabot[bot]
- β¬οΈ bump github.com/sanity-io/litter from 1.2.0 to 1.3.0 31f2091f @dependabot[bot]
- β Add noVendor to module config d4611c43 @bep #7647
- β Add ignoreImports to module imports config 20af9a07 @bep #7646
- π Make ignoreVendor a glob pattern 9a1e6d15 @bep #7642
- β¬οΈ bump github.com/gorilla/websocket from 1.4.1 to 1.4.2 84adecf9 @dependabot[bot]
- β¬οΈ bump github.com/fsnotify/fsnotify from 1.4.7 to 1.4.9 573558a0 @dependabot[bot]
- β¬οΈ bump github.com/kyokomi/emoji 8b10c22f @dependabot[bot]
- β¬οΈ bump github.com/markbates/inflect from 1.0.0 to 1.0.4 195bd124 @dependabot[bot]
- β¬οΈ bump github.com/frankban/quicktest from 1.7.2 to 1.10.2 6a544ece @dependabot[bot]
- Encode & in livereload injected code 4b430d45 @axllent
- β¬οΈ bump github.com/niklasfasching/go-org from 1.3.1 to 1.3.2 b9f10c75 @dependabot[bot]
- β¬οΈ bump github.com/bep/golibsass from 0.6.0 to 0.7.0 537c598e @dependabot[bot]
- β¬οΈ bump golang.org/x/text from 0.3.2 to 0.3.3 67348676 @dependabot[bot]
- β¬οΈ bump github.com/evanw/esbuild from 0.6.5 to 0.6.32 f9cc0ec7 @dependabot[bot]
- β¬οΈ bump github.com/nicksnyder/go-i18n from 1.10.0 to 1.10.1 b5483eed @dependabot[bot]
- β‘οΈ Revert "Update dependabot.yml" 90285f47 @bep
- β‘οΈ Update replaceRE func f7c1b5fe @moorereason
- β‘οΈ Update replace func 183e8626 @moorereason
- β‘οΈ Update merge function f50ee6bb @moorereason
- β‘οΈ Update dependabot.yml c0655ba6 @bep
- Create dependabot.yml a2dda22c @bep
- β Remove Pygments from requirements.txt 910d81a6 @bep
- π Regen CLI docs 8c490a73 @bep
- π Regen docs helper e6cd9da4 @bep
- βͺ markup/asciidocext: Revert trace=true dcf25c0b @bep
- β‘οΈ Update to Go 1.15.1 and 1.14.8 e820b366 @bep #7627
- β Add support for .TableOfContents 3ba7c925 @npiganeau #1687
- β Add a test case 19ef27b9 @bep #7619
- β Add SourceMap flag with inline option c6b661de @richtera #7607
- β Remove logic that hides 'Building Sites' message after build completes d39636a5 @jwarner112 #7579
- π Improve stderr logging for PostCSS and simlilar ec374204 @bep #7584
- Fail on partials with return when given none or a zero argument ae63c2b5 @bep #7572#7528
- β‘οΈ Update to Go 1.15 e627449c @bep #7554
- β‘οΈ Revert "Update stale.yml" c2235c6a @bep
- β‘οΈ Update stale.yml 4f69ade7 @bep
- β Remove trailing whitespace and tabs from RSS templates 5f425901 @solarkennedy
- β Add uninstall target 21dbfa1f @felicianotech
- β‘οΈ Update Chroma to 0.8.0 e5591e89 @jmooring #7517
- β‘οΈ Update go-org to v1.3.1 88929bc2 @niklasfasching
- Collect transition attributes as classes 00e00da2 @bep #7509
- β Add option for setting bundle format 0256959a @bep #7503
- Simplify options handling eded9ac2 @bep #7499
- π make sure documentation intro text only appears once 8d725128 @TheHippo
- β Add es5 build target e81aef0a @bep
- esbuild v0.6.5 9f919147 @bep
- β Add .Defines to js.Build options 35011bcb @bep #7489
π Fixes
Other
- π Fix AsciiDoc TOC with code 6a848cbc @helfper #7649
- β markup/asciidocext: Fix broken test 4949bdc2 @bep
- π Fix some change detection issues on server reloads 4055c121 @bep #7623#7624#7625
- π Fixed misspelled words ad01aea3 @aurkenb
- π Fix a typo in CONTRIBUTING.md f3cb0be3 @capnfabs
- βͺ Revert "Fix ellipsis display logic in pagination template" bffc4e12 @jmooring
- π Fix ellipsis display logic in pagination template 2fa851e6 @jmooring #7523
- π Fix Asciidoctor args 45c665d3 @helfper #7493
- π Fix date format in internal schema template a06c06a5 @jmooring #7495
- π Fix baseof block regression c91dbe4c @bep #7478
- It used the directory where the
-
v0.74.3 Changes
July 23, 2020π This is a bug-fix release with a couple of important fixes.
- publisher: Collect transition attributes as classes 00e00da2 @bep #7509
- π Fix Asciidoctor args 45c665d3 @helfper #7493
- π Fix date format in internal schema template a06c06a5 @jmooring #7495
- resources/js: Add option for setting bundle format 0256959a @bep #7503
- resources/js: Simplify options handling eded9ac2 @bep #7499
- π make sure documentation intro text only appears once 8d725128 @TheHippo
- π resources/js: Add es5 build target e81aef0a @bep
- deps: esbuild v0.6.5 9f919147 @bep
-
v0.74.2 Changes
July 17, 2020 -
v0.74.1 Changes
July 13, 2020 -
v0.74.0 Changes
July 13, 2020Note: The documentation site isn't updated with all of the main new things below. We will get to it soon.
π This release comes with native JavaScript bundling (and minifier), with import support (from
node_modules
etc.), tree shaking, scope hoisting for ES6 modules, transpilation of JSX and newer JS syntax down to ES6, JavaScript/JSX and TypeScript/TSX support. And it's very fast. Benchmarks rates it at least 100x faster than the other JavaScript bundlers included. This new feature is backed by the very impressive ESBuild project by @evanw. Many thanks to @remko for the integration work.π A very simple example building a TypeScript file:
{{ $js := resources.Get "js/main.ts" | js.Build }}
π This release also comes with Open API 3-support. This makes it much easier to create "Swagger styled" API-documentation. The below will unmarshal your YAML file into this object graph:
{{ $api := resources.Get "api/openapi.yaml" | openapi3.Unmarshal }}
Hugo's Asciidoc integration has also gotten a face lift. A big shoutout to @muenchhausen and @bwklein for their work on this.
And finally, partials can now be defined inline -- and that is way more useful than it sounds.
This release represents 23 contributions by 9 contributors to the main Hugo code base. @bep leads the Hugo development with a significant amount of contributions, but also a big shoutout to @niklasfasching, @bwklein, and @muenchhausen for their ongoing contributions.
π And a big thanks to @digitalcraftsman for his relentless work on keeping the themes site in pristine condition and to @davidsneighbour, @coliff and @kaushalmodi for all the great work on the documentation site.
π Many have also been busy writing and fixing the documentation in hugoDocs,
which has received 8 contributions by 7 contributors. A special thanks to @OmarEmaraDev, @regisphilibert, @coliff, and @jessicahuynh for their work on the documentation site.Hugo now has:
- 45377+ stars
- 438+ contributors
- 331+ themes
β¨ Enhancements
Templates
Output
Core
Other
- π Regenerate docs helper 25e3da33 @bep
- β Add js.Build asset bundling 2fc33807 @remko #7321
- β Add openapi3.Unmarshal 12a65e76 @bep #7442#7443
- β Remove trailing hyphen from auto heading ID 58c0f5e6 @jmooring #6798
- 0οΈβ£ Ensure that non-trivial default flag values are passed through. a1c3e3c1 @vangent
- β‘οΈ Update formats.md doc for new allowed extensions. e9f87c4e @bwklein
- β‘οΈ Update config.go to add two Asciidoctor extensions beb6c03b @bwklein
- β Add support for inline partials 4a3efea7 @bep #7444
- β Add support for native Org dates in frontmatter c66dc6c7 @sometimesfood
- β‘οΈ Update go-org to v1.3.0 127d5feb @niklasfasching
- β‘οΈ Update go-org to v1.2.0 2d42ba91 @niklasfasching
- β‘οΈ Update bug_report.md 5b7b5dea @bep
- β Remove some unused code 057b1377 @bep
- β Add an option to print memory usage at intervals 48dbb593 @bep
- Rework external asciidoctor integration f0266e2e @muenchhausen
- β Enable the embedded template test when race detector is off 77aa385b @bep #5926
- π Merge branch 'release-0.73.0' 545a1c1c @bep
- β‘οΈ Updated installation instruction about Sass/SCSS support 0b579db8 @mateusz-szczyrzyca
π Fixes
Other
-
v0.73.0 Changes
June 23, 2020π Again, a release on the small side. Some new features -- one example is that we now support hook templates per section/type, see #7349 -- and some important bug fixes.
π But the most important part of this release is that we have now finally cleaned up the terms used for the taxonomy page kinds. This has made the taxonomy feature in Hugo harder to understand than it needed to be. The old/new values for these are
taxonomy
=>term
andtaxonomyTerm
=>taxonomy
. We have taken great care to avoid site breakage. See #6911 for more information.This release represents 21 contributions by 9 contributors to the main Hugo code base.bjorn.erik.pedersen leads the Hugo development with a significant amount of contributions, but also a big shoutout to helfper, moorereason, and onedrawingperday for their ongoing contributions.
π And a big thanks to @digitalcraftsman for his relentless work on keeping the themes site in pristine condition and to @davidsneighbour, @coliff and @kaushalmodi for all the great work on the documentation site.π Many have also been busy writing and fixing the documentation in hugoDocs,
which has received 30 contributions by 14 contributors. A special thanks to christianoliff, bjorn.erik.pedersen, patrick, and hello for their work on the documentation site.Hugo now has:
- 326+ themes
Notes
- π Rename taxonomy kinds from
taxonomy
toterm
,taxonomyTerm
totaxonomy
#6911
β¨ Enhancements
Templates
- tpl/crypto: Add hmac
Other
- β Remove some old release notes
- Create robots.txt in the domain root directory #5160#4193
- π Make GroupByParamDate work with string params #3983
- β Add GroupByLastmod #7408
- π Rename taxonomy kinds from taxonomy to term, taxonomyTerm to taxonomy #6911#7395
- β Add genDocsHelper mage target
- Regenerate templates
- Beautify HTML generated by pagination template #7199
- β Add a nested data dir test
- π Use os.PathError in RootMappingFs.doLstat
- β Remove credit (#7347)
- π Allow hook template per section/type #7349
π Fixes
Templates
- π Fix bad rounding in NumFmt #7116
Other
- π Fix aliases with path in baseURL
- π Fix server data race/nil pointer in withMaps #7392
- π Fix order of GetTerms #7213
- π Fix aliases with uglyURLs
- π Fix crash for closing shortcode with no .Inner set #6857#7330
- π Fix aliases with relativeURLs
- π Fix URL rewrites vs fast render server mode #7357
-
v0.72.0 Changes
May 31, 2020π This is a rather small release, its probably main motivation being the fixes in Goldmark's Typographer extension.
π This release also adds redirect and URL rewrite support to the development server, with mostly Netlify-compatible configuration syntax. This is especially useful if you're building a SPA with client-side routing.
This release represents 13 contributions by 3 contributors to the main Hugo code base.
π Many have also been busy writing and fixing the documentation in hugoDocs,
which has received 9 contributions by 6 contributors. A special thanks to @faraixyz, @bep, @coliff, and @Leon0824 for their work on the documentation site.Hugo now has:
- 44383+ stars
- 437+ contributors
- 327+ themes
β¨ Enhancements
Other
- β Add Scratch.Values 2919a6a5 @bep #7335
- β‘οΈ Update Goldmark to improve Typographer 432885c4 @bep #7289
- β Add redirect support to the server 6a3e8974 @bep #7323
π Fixes
Other
- π Fix tag collector for nested table elements c950c86b @bep #7318
- π Fix build error: my previous commits did not fix it 91520249 @anthonyfok
-
v0.71.1 Changes
May 25, 2020π This is a bug-fix release with a couple of important fixes.
- β Add some more date test cases 81f56332 @bep #7310
- π Fix RenderString vs render hooks 9698b0da @bep #7265
- β Prevent WARNINGs in RenderString 32344fe3 @bep
- π Fix IsAncestor/IsDescendant for taxonomies 4d7fa9f1 @bep #7305
- π Fix GetPage on section/bundle name overlaps a985efce @bep #7301
- π Fix Go template script escaping 6c3c6686 @bep #6695
- β Add a test helper c34bf485 @bep