Releases: gohugoio/hugo
v0.40.3
Hugo 0.40.3
fixes a possible .Content
truncation issue introduced in 0.40.1
90d0d830 @bep #4706. This should be very rare. It has been reported by only one user on a synthetic site. We have tested a number of big sites that does not show this problem with 0.40.2
, but this is serious enough to warrant a patch release.
Automated with GoReleaser
Built with go version go1.10.1 linux/amd64
v0.40.2
This release fixes some regressions introduced in Hugo 0.40
. See the milestone for an issue list.
- Reset .Page.Scratch on live-reload 655983a2 @bep #4683
- Fix .WordCount, .FuzzyWordCount, .ReadingTime when summary marker is set 001a28c2 @bep #4675#4682
Automated with GoReleaser
Built with go version go1.10.1 linux/amd64
v0.40.1
v0.40
Hugo 0.40
is The Revival of the Shortcodes. Shortcodes is one of the prime features in Hugo. Really useful, but it has had some known shortcomings. @bep has been really busy the last week to address those.
In summary:
.Content
for a page retrieved in a query in a shortcode is now almost always available. Note that shortcodes can include content that can include shortcodes that can include content... It is possible to bite your tail. See more below.- Shortcodes are now processed and rendered in their order of appearance.
- Related to the above, we have now added a zero-based
.Ordinal
to the shortcode.
The first bullet above resolves some surprising behaviour when reading other pages' content from shortcodes. Before this release, that behaviour was undefined. Note that this has never been an issue from regular templates.
It will still not be possible to get the current shortcode's page's rendered content. That would have impressed Einstein.
The new and well defined rules are:
.Page.Content
from a shortcode will be empty. The related.Page.Truncated
.Page.Summary
,.Page.WordCount
,.Page.ReadingTime
,.Page.Plain
and.Page.PlainWords
will also have empty values.- For other pages (retrieved via
.Page.Site.GetPage
,.Site.Pages
etc.) the.Content
is there to use as you please as long as you don't have infinite content recursion in your shortcode/content setup. See below. .Page.TableOfContents
is good to go (but does not support shortcodes in headlines; this is unchanged)
If you get into a situation of infinite recursion, the .Content
will be empty. Run hugo -v
for more information.
This release represents 19 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 13 contributions by 6 contributors. A special thanks to @kaushalmodi, @anthonyfok, @bep, and @regisphilibert for their work on the documentation site.
Hugo now has:
- 25071+ stars
- 446+ contributors
- 222+ themes
Notes
- We have added a
timeout
configuration setting. This is currently only used to time out the.Content
creation, to bail out of recursive recursions. Runhugo -v
to see potential warnings about this. Thetimeout
is set default to10000
(10 seconds).
Enhancements
Templates
- Add
path.Ext
,path.Dir
andpath.Base
47e7788b @bep - Make
fileExist
use the same filesystem asreadFile
51af1d2e @bep #4633
Other
- Add
.Page.BundleType
402f6788 @bep #4662 - Add zero-based
Ordinal
to shortcode 3decf4a3 @bep #3359 - Process and render shortcodes in their order of appearance 85535084 @bep #3359
- Init the content and shortcodes early 19084eaf @bep #4632
- Prepare child page resources before the page itself 3238e14f @bep #4632
- Make .Content (almost) always available in shortcodes 4d26ab33 @bep #4632#4653#4655
- Add language merge support for Pages in resource.Resources 47c05c47 @bep #4644
- Improve .Content vs shortcodes e590cc26 @bep #4632
- Improve .Get docs 74520d2c @paulcmal
- Update missing positional parameter test for .Get e2b277bb @paulcmal
- Improve error message in metadata parse d681ea55 @bep #3696
- Add some context to front matter parse error 159bed34 @bep #4638
- Updated GetCSV error message (#4636) 5cc944ff @CubeLuke
- .Get doesn't crash on missing positional param fixes #4619 236f0c84 @paulcmal
- fix syntax signature cd6a2612 @paulcmal
Automated with GoReleaser
Built with go version go1.10.1 linux/amd64
v0.39
Nat King Cole was a fantastic American jazz pianist. When his bass player had visited the bar a little too often, he started with his percussive piano playing to keep the tempo flowing. Oscar Peterson called it "Nat's stabilizers". This release is the software equivalent of that. We have been doing frequent main releases this year, but looking back, the patch releases that followed them seemed unneeded. And looking at the regressions, most of them stem from the commands
package, a package that before this release was filled with globals and high coupling. This package is now rewritten and accompanied with decent test coverage.
But this release isn't all boring and technical: It includes several important bug fixes, several useful new template functions, and Resource.Content
allows you to get any resource's content without having to fiddle with file paths and readFile
.
This release represents 61 contributions by 4 contributors to the main Hugo code base. A shout-out to @bep for the implementation and @it-gro and @RickCogley for the help testing it.
@bep leads the Hugo development with a significant amount of contributions and his witty Norwegian humour, but also a big shoutout to @anthonyfok, @thedodobird2, and @neurocline for their ongoing contributions.
And a big thanks to @digitalcraftsman for his relentless work on keeping the themes site in pristine condition and to @kaushalmodi for his great work on the documentation site.
Many have also been busy writing and fixing the documentation in hugoDocs,
which has received 6 contributions by 5 contributors. A special thanks to @kaushalmodi, @regisphilibert, @bep, and @tomanistor for their work on the documentation site.
Hugo now has:
- 24911+ stars
- 446+ contributors
- 218+ themes
Notes
- The
main.Execute
function now returns aResponse
object and the globalHugo
variable is removed. This is only relevant for people building some kind of API around Hugo. - Remove deprecated
File.Bytes
94c8b29c @bep
Enhancements
Templates
- Add
anchorize
template func 4dba6ce1 @bep - Add
path.Join
880ca19f @bep - Add
path.Split
template func 01b72eb5 @bep
Other
- Implement
Resource.Content
0e7716a4 @bep #4622 - Make
Page.Content
a method that returns interface{} 417c5e2b @bep #4622 - Remove accidental and breaking space in baseURL flag 1b4e0c41 @bep #4607
- Properly handle CLI slice arguments 27a524b0 @bep #4607
- Correctly handle destination and i18n-warnings bede93de @bep #4607
- Allow "*/" inside commented out shortcodes 14c35c8a @bep #4608
- Make commands.Execute return a Response object 96689a5c @bep #4598
- Remove some TODOs e7010c1b @bep #4598
- Add basic server test a7d00fc3 @bep #4598
- Remove the Hugo global b110d0ae @bep #4598
- Make the limit command work again 73825cfc @bep #4598
- Move the commands related logic to its own file a8f7fbbb @bep #4598
- Add CLI tests e8d6ca95 @bep #4598
- Make the hugo command non-global 4d32f2fa @bep #4598
- Extract some common types into its own file 018602c4 @bep #4598
- Make the server command non-global 2f0d98a1 @bep #4598
- Make the gen commands non-global e0621d20 @bep #4598
- Make the list commands non-global e26a8b24 @bep #4598
- Make the import commands non-global 2a2c9838 @bep #4598
- Make the config command non-global 15b1e269 @bep #4598
- Make the new commands non-global 56a13080 @bep #4598
- Make convert command non-global 4b780ca7 @bep #4598
- Make more commands non-global 7bc5e89f @bep #4598
- Make benchmark non-global fdf1d94e @bep #4598
- Start of flag cleaning 1157fef8 @bep #4598
- Use short date format in CLI docs e614d8a5 @bep #4598
- Update README.md fca49d6c @thedodobird2
- Sync dependencies 0e8b3cbc @bep
- Bump Go versions 230f2b8c @bep #4545
- Add bash completion 874159b5 @anthonyfok
- Handle mass content etc. edits in server mode 730b66b6 @bep #4563
Fixes
v0.38.2
This is a bug-fix release with a couple of important fixes:
- Fix handling of the
--contentDir
and possibly other related flags 080302eb @bep #4589 - Fix handling of content files with "." in them 2817e842 @bep #4559
Also in this release:
Automated with GoReleaser
Built with go version go1.10 linux/amd64
v0.38.1
This is a bug-fix that is mainly motivated by some issues with server live reloading introduced in Hugo 0.38.
- Fix livereload for the home page bundle f87239e4 @bep #4576
- Fix empty BuildDate in "hugo version" 294c0f80 @anthonyfok
- Fix some livereload content regressions a4deaeff @bep #4566
- Update github.com/bep/gitmap to fix snap build 4d115c56 @anthonyfok #4538
- Fix two tests that are broken on Windows 26f34fd5 @neurocline
This release also contains some improvements:
- Add bash completion 874159b5 @anthonyfok
- Handle mass content etc. edits in server mode 730b66b6 @bep #4563
Automated with GoReleaser
Built with go version go1.10 linux/amd64
v0.38
Hugo 0.38
is an Easter egg filled with good stuff. We now support fetching date and slug from the content filename, making the move from Jekyll even easier. And you can now set contentDir
per language with intelligent merging, and themes can now provide configuration ... Also worth mentioning is several improvements in the Chroma highlighter, most notable support for Go templates.
We are working hard to get the documentation up-to-date with the new features, but you can also see them in action with the full source at hugotest.bep.is.
This release represents 39 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 @anthonyfok, @felicianotech, and @paulcmal for their ongoing contributions.
And a big thanks to @digitalcraftsman for his relentless work on keeping the themes site in pristine condition and to @kaushalmodi for his great work on the documentation site.
Also, a shoutout to @regisphilibert for his work on the new Code Toggle Shortcode on the Hugo docs site, which we will put to good use to improve all the configuration samples.
Many have also been busy writing and fixing the documentation in hugoDocs,
which has received 55 contributions by 18 contributors. A special thanks to @kaushalmodi, @bep, @xa0082249956, and @paulcmal for their work on the documentation site.
Hugo now has:
- 24547+ stars
- 447+ contributors
- 213+ themes
Notes
- Hugo now allows partial redefinition
outputs
in your site configuration. This is what most people would expect, but it is still a change in behaviour. For details, see #4487 - Before this release, Hugo flattened URLs of processed images in sub-folders. This worked fine but was not intentional. See #4502.
Enhancements
- Allow themes to define output formats, media types and params e9c7b620 @bep #4490
- Allow partial redefinition of the
ouputs
config f8dc47ee @bep #4487 - Add a way to merge pages by language ffaec4ca @bep #4463
- Extract
date
andslug
from filename 68bf1511 @bep #285#3310#3762#4340 - Add
Delete
method to delete key fromScratch
e46ab29b @paulcmal - Simplify Prev/Next 79dd7cb3 @bep
- List Chroma lexers 2c54f1ad @bep #4554
- Add support for a
contentDir
set per language eb42774e @bep #4523#4552#4553 - Update Chroma 7a634898 @bep #4549
- Add
.Site.IsServer
1823c053 @felicianotech #4478 - Move to Ubuntu Trusty image 511d5d3b @anthonyfok
- Bump some deprecations b6798ee8 @bep
- Update Chroma to get
Go template support
904a3d9d @bep #4515 - Recover from error in server f0052b6d @bep #4516
- Spring test cleaning, take 2 da880157 @bep
- Add docs for
lang.Merge
70005364 @bep - Remove archetype title/date warning ac12d51e @bep #4504
- Add docs on the new front matter configuration 0dbf79c2 @bep #4495
- Refactor the GitInfo into the date handlers ce6e4310 @bep #4495
- Do not print build total when
--quiet
is set 50a03a5a @bep #4456
Fixes
- Fix freeze in invalid front matter error case 93e24a03 @bep #4526
- Fix path duplication/flattening in processed images 3fbc7553 @bep #4502#4501
- Fix SVG and similar resource handling ba94abbf @bep #4455
Automated with GoReleaser
Built with go version go1.10 linux/amd64
v0.37.1
This is a bug-fix release with a one important fix:
Image content such as SVG
cannot be scaled with the built-in image processing methods, but it should still be possible to use them as page resources. This was a regression in Hugo 0.37
and is now fixed. ba94abbf @bep #4455
Automated with GoReleaser
Built with go version go1.10 linux/amd64
v0.37
The main item in Hugo 0.37
is that we now properly preserve the colour palette when processing PNG
images. We got reports from users experiencing their PNG
images getting bigger in file size when scaled down. Now, if you, as an example, start out with a carefully chosen 8 bit colour palette (i.e. PNG-8
), this is now what you will end up with. A special thanks to @aitva for doing the investigative work finding a proper fix for this issue.
This release represents 40 contributions by 5 contributors to the main Hugo code base.
@bep leads the Hugo development with a significant amount of contributions, but also a big shoutout to @vassudanagunta, @kaushalmodi, and @curttimson for their ongoing contributions.
And as always a big thanks to @digitalcraftsman for his relentless work on keeping the documentation and the themes site in pristine condition.
Many have also been busy writing and fixing the documentation in hugoDocs,
which has received 24 contributions by 8 contributors. A special thanks to @bep, @4RU, @kaushalmodi, and @mitchchn for their work on the documentation site.
Hugo now has:
- 23649+ stars
- 447+ contributors
- 197+ themes
Notes
- Hugo will now convert non-string
YAML
map keys to string. See #4393 for more information. You will get aWARNING
in the console if you are touched by this. - We have improved the
PNG
processing, and have incremented the version numbers on the URL for the processedPNG
image. This will just work, but you may want to runhugo --gc
to clean up some old stale images in the resource cache.
Enhancements
Templates
- Add template func for TOML/JSON/YAML docs examples conversion. This is mainly motivated by the needs of the Hugo docs site. d382502d @bep #4389
Core
- Refactor tests for JSON, YAML and TOML equivalency, add coverage 82eefded @vassudanagunta
- Re-enable YAML data tests disabled in f554503 e1728349 @vassudanagunta
Other
- Preserve color palette for PNG images 799c654b @bep #4416
- Use
Floyd-Steinberg
dithering for PNGs 13ea1e7c @bep #4453 - Make
ge
,le
etc. work with the Hugo Version number 0602135f @bep #4443 - Update dependencies eaf573a2 @bep #4418
- Update to Go 1.10 (!) Take 2 a3f26e56 @bep
- Update to Go 1.10 (!) ff10c15a @bep
- Add WARNING for integer YAML keys 0816a97a @bep #4393
- Tune stringifyMapKeys 10a917df @bep
- Rename stringifyYAMLMapKeys to stringifyMapKeys d4beef0d @bep
- Add benchmarks for stringifyYAMLMapKeys 51213e0b @bep
- Add support for
YAML
array data files 1fa24177 @vassudanagunta #3890 - Account for array type data in data dir merge/override logic bb549a0d @vassudanagunta #4366
- Add "target" and "rel" parameters to figure shortcode 2e95ec68 @kaushalmodi
- image" property, not "twitter:image:src" 76d38d5e @kaushalmodi
Fixes
Core
- Continue
GitInfo
lookup on error e9750d83 @bep - Fix paginator
URL
for sections with URL in front matter 9f740b37 @bep #4415
Other
- Fix bug in Site.assembleSections method 00868081 @vassudanagunta #4447
- Update Blackfriday to fix footnote HTML5 validation error 492fea7c @bep #4433
- Fix
YAML
maps key type 16a5c745 @dmgawel #2441 - Remove
ERROR
on missing baseURL 55bd46a6 @bep #4397
Automated with GoReleaser
Built with go version go1.10 linux/amd64