Hugo 0.30.1 Released

Spread the word:

2 Likes

As usual :

Hugo Snap - the Hugo Snap/SnapCraft package - updated
Docker Hugo - a Hugo Docker image for Continuous Integration- wonā€™t be updated see 0.30.2
Fedora Copr - Hugo RPM packages for Fedora and CentOS - updated :slight_smile:

I skipped the .1 release since the .2 came out so fast.

Just a small comment about Hugo 0.30, which introduced the errorf function. The doc say this function cause the build to fail, and the GitHub issue that request this feature also asked for that.

But thatā€™s not what Iā€™m seeing:

{{ errorf "Oops, something went wrong! %s" .RelPermalink }}
C:\hugo>hugo server -DEF
Started building sites ...
ERROR 2017/12/02 18:21:50 Oops, something went wrong! /post/....
ERROR 2017/12/02 18:21:50 Oops, something went wrong! /post/...
ERROR 2017/12/02 18:21:50 Oops, something went wrong! /post/...
ERROR 2017/12/02 18:21:50 Oops, something went wrong! /post/.../
ERROR 2017/12/02 18:21:50 Oops, something went wrong! /post/..
ERROR 2017/12/02 18:21:50 Oops, something went wrong! /post/...
ERROR 2017/12/02 18:21:50 Oops, something went wrong! /post/...
ERROR 2017/12/02 18:21:50 Oops, something went wrong! /post/...

Built site for language en:
4 of 4 drafts rendered
1 of 1 future rendered
3 of 3 expired rendered
14 regular pages created
60 other pages created
0 non-page files copied
29 paginator pages created
8 categories created
17 tags created
total in 150 ms
Watching for changes in C:\hugo\{data,content,layouts,static,themes}
Serving pages from memory
Web Server is available at http://localhost:1313/ (bind address 127.0.0.1)
Press Ctrl+C to stop
C:\hugo>hugo env
Hugo Static Site Generator v0.30.2 windows/amd64 BuildDate: 2017-10-20T12:44:44+02:00
GOOS="windows"
GOARCH="amd64"
GOVERSION="go1.9.1"

I donā€™t know if this is an issue or not. But I didnā€™t feel this was important enough to open a specific topic (because it doesnā€™t give me problems, I just noticed it when working with Hugo today). And so the topic bump.

I also donā€™t feel like I have the time and energy to open a GitHub issue, since the burden of proof there is higher (to prevent me from being directed to the forum). But did still feel the obligation to let you guys know about this misfit. And so hence the forum reply here. That way as a non-developer I can still let you know. :slight_smile:

It works as expected for me:

ERROR 2017/12/02 18:46:21 This should FAIL
...
~/sites/bepsays.com  master āœ—                                                                93d āš‘  ā‰
ā–¶ echo $?
255

What is your definition of a ā€œfailed buildā€?

Thanks for your reply and checking it.

That hugo or hugo server exits and stops building the website. Like an unhandled Go panic would. That would definitely fail the build.

I though a ā€˜failed buildā€™ would be an incomplete website build, with only the pages rendered until the errorf function executed.

But now I see that a build can also fail even when all static pages get rendered. For the errorf function, a build fails when it triggers an error message. In that case, the website build didnā€™t do 100% of what it intended to do. So that would be the ā€˜failā€™.

That is not the ā€œHugo definitionā€. The Hugo build is the hugo command (i.e. not server, that behaves differently for obvious reasons (you would not want it to shut down on any ERROR)) and a failed build is defined by an OS exit code != 0.

2 Likes