d1cf9adc4 Fix typo 26e10a690 Fix the name and arg mismatch between partial defn and call 2db0e53cd Merge commit '9c36cff15224f6cbd19058ad61311229b7a23c83' 9c36cff15 Squashed 'themes/gohugoioTheme/' changes from 68ddff44..b8202f53 4b021eff8 Update lang.Merge.md b37af2916 Add title to yaml a9a281233 Fixed incorrect usage of the code-toggle shortcode 4560a0169 Update Warning for Theme Links (#676) 0305e3c6b Document .File.ContentBaseName 6d30c5aa1 Update configuration.md 158df174a Document .Sites and .Sites.First 0c0f583b8 Add stale config e2531afd8 Document path template functions 4dd779057 Clarify that partialCached is per site/language 19e5bbe0c Update index.md 44b000857 Add missing dot a41300cf9 Release 0.52 2d1d92b88 Merge branch 'temp52' c5925250d releaser: Prepare repository for 0.53-DEV d000b04a2 releaser: Add release notes to /docs for release of 0.52 4bb983a0a releaser: Bump versions for release of 0.52 36736ca28 tpl: Add "param" shortcode 378677aa6 Add Elasticsearch/bonsai.io to services doc. 4c3fd4fa4 docs: Document inline shortcodes 6c64c374c Whitelist CSS modules from purge 817a872b9 Improve search icon position cf86ff1c7 Add minification and resource cache clear to build command fd77e8df3 Update asset dependencies and adopt Hugo Pipes cdbe97e8c Update render.md b0e279220 git command to update submodule to latest a1cb98c12 cache/filecache: Add a :project placeholder 07c1b2b46 cache/filecache: Use time.Duration for maxAge ffa9b165e Add AND as a title 6e7733b40 Add OR as a sub title to make it easier to find in search 72b6791a1 docs: Document the new file cache 714d3ca91 Fix minification issues cd1e961da Revert "Add Elasticsearch/bonsai.io to services doc." 15a0cda6e Add Elasticsearch/bonsai.io to services doc. f931d86de Release 0.51 e2ffe867a Merge branch 'temp51' 423e7f5c8 releaser: Prepare repository for 0.52-DEV c6f2d6ae1 releaser: Add release notes to /docs for release of 0.51 5bbb556dc releaser: Bump versions for release of 0.51 3b2b172b9 docs: Document shortcode error handling b8672f3d4 docs: Document symdiff 4bc6071e6 docs: Document complement d1baab752 docs: Re-generate CLI docs 9ea667e24 Revert "tpl: Update Jsonify to return pretty-print output" ce5a1403d docs: Regenerate the docs helper 99a1f4a94 Fix note for reserved partial name(starting with -> including). eba3cbc42 fix accidentally modification on paragraph. 3eebd98c3 Add note for reserved partial name. 40b881cc2 Document templates.Exists b5c3bcd3b Update multilingual.md 61c59c67e Fix misspelling (#648) f21d8c4a4 Correct minor typo (#5372) e967001b9 Release 0.50 685fd6b08 releaser: Prepare repository for 0.51-DEV f245a9faa releaser: Add release notes to /docs for release of 0.50 4354da30d releaser: Bump versions for release of 0.50 feaa05469 docs: Regenerate CLI docs 5c724200c Merge commit 'd6a4af7018e8618944a6471ceeb7aae1d4df6afa' 2ddab36c2 Merge commit '74309fe5699a595080fdb3a14711e0869babce99' 8cf296a7c docs: Regenerate CLI docs 9097683dd tpl: Update Jsonify to return pretty-print output git-subtree-dir: docs git-subtree-split: d1cf9adc412245c96d9d32592a903370d3972aef
20 KiB
date: 2018-10-29 title: "Hugo 0.50: Errors so Good, You’ll Want to Fail!" description: "Errors with full filename and line and column number, shown in browser. And improved Fast Render Mode …" categories: ["Releases"]
Hugo 0.50
brings greatly improved error messages, and we now also show them in the browser. Having error messages with filename, line- and column number greatly simplify troubleshooting. Many editors (like VS Code) even let you click and navigate directly to the problematic line. If your editor requires a different log format, you can set it via the HUGO_FILE_LOG_FORMAT
OS environment variable:
env HUGO_FILE_LOG_FORMAT="\":file::line::col\"" hugo server
But this release isn't all about error handling. Getting line- and column number into "every" error also meant that we had to consolidate and simplify some code paths, which, as a nice side effect, made Hugo a little bit faster. Benchmarks show it running about 5% faster and consume about 8% less memory.
Also, we have now implemented "render on demand" in Hugo's Fast Render Mode (default when running hugo server
). This means that you should now always see updated content when navigating around the site after a change.
This release represents 88 contributions by 14 contributors to the main Hugo code base. @bep leads the Hugo development with a significant amount of contributions, but also a big shoutout to @moorereason, @anthonyfok, and @GregorioMartinez for their ongoing contributions.
And a big thanks to @digitalcraftsman and @onedrawingperday for their 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 14 contributions by 9 contributors. A special thanks to @bep, @NotWoods, @Nick-Rivera, and @tomanistor for their work on the documentation site.
Hugo now has:
- 29842+ stars
- 441+ contributors
- 275+ themes
Notes
- You should not get stale content in Fast Render Mode anymore.
- Errors will now show up in the browser by default, turn it off by running
hugo server --disableBrowserError
jsonify
will now produce pretty/indented output
Enhancements
Templates
- Handle truncated identifiers in Go template errors 2d7709d1 @bep #5346
- Update Jsonify to return pretty-print output 5a52cd5f @SeanPrashad #5040
- Improve the Execute panic error message 0fe4ff18 @bep #5327
- Use .Lastmod in embedded schema template c21e5179 @akshaybabloo #5320
- Cast IsSet key to int for indexed types 0d5110d0 @moorereason #3681
- Add a delimiter parameter to lang.NumFmt ce264b93 @moorereason #5260
Core
- Adjust error test to make it pass on Go tip acc14b46 @bep
- Rename some page_* files e3ed4a83 @bep
- Get file context in "config parse failed" errors ed7b3e26 @bep #5325
- Improve errors in /i18n handlling 2bf686ee @bep #5324
- Improve errors in /data handlling 9f74dc2a @bep #5324
- Continue the file context/line number errors work d1661b82 @bep #5324
- Remove the now superflous Source struct 7930d213 @bep #5324
- Redo the summary delimiter logic 44da60d8 @bep #5324
- Integrate new page parser 1e3e3400 @bep #5324
- Use []byte in shortcode parsing 1b7ecfc2 @bep #5324
- Use stdlib context package 4b4af2c5 @GregorioMartinez
- Normalize permalink path segments fae48d74 @moorereason #5223#4926
- Improve error message for bad taxonomy weights d3b81ee5 @moorereason
- Cast taxonomy weight parameters to int 1fd30d46 @moorereason #4628
- Allow nil to be unwrapped as *Page 498d6299 @moorereason #5043
- Be a litle more specific in NextPage TODO fb732d53 @bep
- Introduce Page.NextPage and Page.PrevPage ad705aac @felicianotech #1061
Other
- Update go.sum 7082a5d1 @bep
- Update minify aa281b51 @bep #5261
- Regenerate CLI docs 32501987 @bep
- Make sure the global logger also gets colored labels 9c88a8a5 @bep #4414
- Avoid using the global logger 95e72f5e @bep #4414
- Add color to ERROR and WARN 1c7b7b4e @bep #4414
- Make the file error log format configurable 1ad117cb @bep #5352
- Allow a mix of slice types in append/Scratch.Add dac7092a @bep #5361
- Allow .Data.Integrity to be accessed on its own b27ccf34 @bep #5296
- Update minify 83c873ff @bep #5261
- Update cast a2440dc0 @bep #5340
- Truncate the error log on repeated config errors 1e9ac3dc @bep
- Regenerate CLI docs 40e99672 @bep #5354
- Serialize image processing 3a3badfd @bep #5220
- Only show Ansi escape codes if in a terminal df021317 @bep
- Read disableFastRender from flag even if it's not changed 78a4c2e3 @bep #5353
- Use overflow-x: auto; for browser errors d4ebfea1 @bep
- Remove the ANSI color for the browser error version 93aa6261 @bep
- Add some color to the relevant filenames in terminal log deff9e15 @bep #5344
- Run gofmt -s 889aca05 @bep
- Resolve error handling/parser related TODOs 6636cf1b @bep #5324
- Improve handling of JSON errors f669ef6b @bep #5324
- Convert the rest to new page parser code paths eb038cfa @bep #5324
- Consolidate the metadata decoders 129c27ee @bep #5324
- Use []byte in page lexer 27f5a906 @bep #5324
- Add front matter etc. support 2fdc4a24 @bep #5324
- File renames and splitting f6863e1e @bep #5324
- Move the shortcode parser to the new pageparser package d6c16afd @bep #5324
- Avoid panic in error handler on config errors 6f3716dc @bep
- Prevent stale content in Fast Render Mode 4a366fcf @bep #5281
- Allow date and slug from filename for leaf bundles 1f42e47e @Japanuspus #4558
- Show server error info in browser 35fbfb19 @bep #5284#5290#5325#5324
- Add .gitignore "hugo new site" 92979d92 @napei
- Optimize integrity string generation 0a3340e9 @moorereason
- Add help text to "hugo new" 6b21ac3e @elliotforbes
- Set "extended" tag based on build_url on Launchpad d1442053 @anthonyfok
- Call rst2html directly on *nix 3d4a9882 @shreyanshk
- Update URLs to stop 301 redirects bdca9727 @benabbottnz
- Merge branch 'release-0.49.2' 604ddb90 @bep
- Release 0.49.2 c397f2c0 @bep
- Merge branch 'release-0.49.1' 3583dd6d @bep
- Relase 0.49.1 235acf22 @bep
- Improve append in Scratch 23f48c30 @bep #5275
- Add GOPATH Hugo building tip b5e17f7c @bep
- Consolidate MakeSegment vs MakePathSanitized e421696d @bep #4926
- Render Markdown in figure shortcode "caption" and "attr" params 68181703 @kaushalmodi
- Re-organize the figure shortcode for better readability c5279064 @kaushalmodi
- Update README & CONTRIBUTING 152cffb1 @GregorioMartinez
- Add custom x-nodejs plugin to support ppc64el and s390x 91f49c07 @anthonyfok
- Fetch mage with GO111MODULE=off a475bf12 @anthonyfok
- Use build-snaps instead of building go from source fa873a6c @anthonyfok
- Skip "mage -v test" due to build failure on Launchpad 52ac85fb @anthonyfok
- Move snapcraft.yaml to snap/snapcraft.yaml 27d42111 @anthonyfok
- Update the temp docker script 48413d76 @bep
Fixes
Templates
- Fix baseof.html in error message 646a52a5 @bep #5288
- Fix handling of different interface types in Slice 10ac2ec4 @bep #5269
Core
- Fix test on Windows 083311d0 @bep
- Fix FuzzyWordCount test error message 06d28a46 @GregorioMartinez
Other
- Fix archetype handling of directories in theme 78578632 @bep #5318
- Simple doc fix in CONTRIBUTING.md 3a308912 @krisbudhram
- Fix type checking in Append 2159d77f @bep #5303
- Fix go plugin build failure by renaming go.mod 3033a9a3 @anthonyfok