Releases: gohugoio/hugo
v0.108.0
With Hugo v0.108.0
you can render standalone Markdown images without a surrounding paragraph. Both the HTML- and CommonMark-specification defines image as an inline element. For Markdown, this has meant that if you put an image on its own (not inlined in another paragraph), it would be wrapped in <p></p>
tags, even if you provide your own Render Hook Template.
Now you can get by this annoyance by setting markup.goldmark.parser.wrapStandAloneImageWithinParagraph = false
[markup]
[markup.goldmark]
[markup.goldmark.parser]
wrapStandAloneImageWithinParagraph = false
[markup.goldmark.parser.attribute]
block = true
In the above we have also enabled attribute support for Markdown blocks to illustrate another nice side effect of this; it's now possible to use Markdown attributes (e.g. CSS classes) on standalone images:
This is an inline image: ![Inline Image](/inline.jpg). Some more text.
![Block Image](/block.jpg)
{.blue}
The images in the above Markdown example would, given the hook template below, be rendered wrapped in a figure
element with the blue
CSS class applied in the latter example.
Two new fields are added to the render context passed to image render hooks:
IsBlock
: Returns true if this is a standalone image and the config option markup.goldmark.parser.wrapStandAloneImageWithinParagraph is disabled.Ordinal
: Zero-based ordinal for all the images in the current document.
Bug fixes
- common/hugio: Fix multiWriteCloser.Close 5067775 @bep #10505
- tpl/collections: Fix some index cases where the indices given is a slice and be more lenient with nil inputs d373774 @bep #10489
Improvements
- Make the hugo env non verbose output slightly more verbose f97544a @bep
- Add dart-sass-embedded version info to hugo env -v d8efe08 @bep
- tpl/embedded: Make Open Graph's series optional b82b547 @razonyang
- dartsass: Add sourceMapIncludeSources option e93138d @bep
- github: Update Dart Sass Embedded to 1.56.1 7d16c3c @bep
- markup/goldmark: Add removeSurroundingParagraph for Markdown images 63126c6 @bep #8362 #10492 #10494 #10501
- tpl/tplimpl: Allow alternate comment syntax 0b976d2 @jmooring #10495
- resources: Increase timeout for http.Client a49e51f @dirtymew #10478
- config/security: Add CI env var to whitelist dc44bca @septs
- tpl: Use consistent delimiter spacing in examples b8d5c37 @jmooring
Dependency Updates
- deps: Upgrade github.com/bep/godartsass v0.15.0 => v0.16.0 f5b5b71 @bep
- build(deps): bump github.com/getkin/kin-openapi from 0.109.0 to 0.110.0 50549c8 @dependabot[bot]
- build(deps): bump github.com/evanw/esbuild from 0.15.16 to 0.15.18 535ea8c @dependabot[bot]
- build(deps): bump golang.org/x/text from 0.4.0 to 0.5.0 8bbec42 @dependabot[bot]
- build(deps): bump github.com/evanw/esbuild from 0.15.15 to 0.15.16 0bfa293 @dependabot[bot]
- deps: Upgrade github.com/bep/godartsass v0.14.0 => v0.15.0 83080df @bep
Documentation
v0.107.0
This release is mostly interesting if you do code highlighting. We fixed a bottle neck which should show a significant performance boost for sites using code highlighting. Hugo's gohugo.io docs site builds ~20% faster. Also, Chroma, the highlighting library, is upgraded to v2.4.0 with new lexers and lots of improvements.
Bug fixes
Improvements
- Add a cache for lexers.Get 7855b47 @bep
- markup/goldmark: Improve benchmark 34d1150 @bep
- commands: Create assets directory with new site 85e2ac1 @jmooring #10460
Dependency Updates
- build(deps): bump github.com/getkin/kin-openapi from 0.108.0 to 0.109.0 6a004b8 @dependabot[bot]
- build(deps): bump github.com/evanw/esbuild from 0.15.14 to 0.15.15 0923622 @dependabot[bot]
- build(deps): bump github.com/frankban/quicktest from 1.14.3 to 1.14.4 7477672 @dependabot[bot]
- build(deps): bump golang.org/x/tools from 0.2.0 to 0.3.0 63f7f0f @dependabot[bot]
- deps: Upgrade github.com/alecthomas/chroma/v2 v2.4.0 bcb62d8 @bep
v0.106.0
Bug fixes
- Fix taxonomy weight sort regression 52ea07d @bep #10406
- tlp/resources: resources.Get returns nil when given empty string db945a6 @shifterbit
- tpl/internal: Sync go_templates f6ab955 @bep #10411
Dependency Updates
- build(deps): bump github.com/pelletier/go-toml/v2 from 2.0.4 to 2.0.6 bafb389 @dependabot[bot]
- build(deps): bump github.com/evanw/esbuild from 0.15.13 to 0.15.14 cdd83bf @dependabot[bot]
- deps: Update the libweb version string e00220a @bep
- deps: Upgrade github.com/bep/gowebp v0.1.0 => v0.2.0 a662dda @bep
- build(deps): bump github.com/yuin/goldmark from 1.5.2 to 1.5.3 fe08d35 @dependabot[bot]
- build(deps): bump github.com/spf13/afero from 1.9.2 to 1.9.3 4b675dd @dependabot[bot]
- build(deps): bump github.com/getkin/kin-openapi from 0.107.0 to 0.108.0 24eaa29 @dependabot[bot]
- build(deps): bump github.com/clbanning/mxj/v2 from 2.5.6 to 2.5.7 58a98c7 @dependabot[bot]
- build(deps): bump golang.org/x/net from 0.1.0 to 0.2.0 900904f @dependabot[bot]
- build(deps): bump github.com/evanw/esbuild from 0.15.12 to 0.15.13 24eca0c @dependabot[bot]
Documentation
v0.105.0
Bug fixes
- Avoid nilpointer when shortcode page content output nil e5d2a8f @davidejones #10391
- Revise the fix for shortcode vs output format nilpointer 631d768 @bep #10391
Improvements
- livereload: Use text/javascript here, too 00ff161 @bep
- media: Rename application/javascript, application/typescript to text/javascript etc. 588710a @bep
- Skip flakey server tests on GitHub Action on Windows 20ef6dc @bep
- github: Avoid duplicate test runs d1cd1db @bep
- tpl/encoding: Add noHTMLEscape option to jsonify 09e1011 @bep
- Don't use self-closing generator tag 01ebb6e @djibe
- github: Use SHA versions 1fd3320 @bep
- Resolve dependency-path not found error in workflow 0fb2b3d @jongwooo
- Use setup-go action to cache dependencies db05232 @jongwooo
Dependency Updates
- build(deps): bump golang.org/x/tools from 0.1.12 to 0.2.0 f505854 @dependabot[bot]
- build(deps): bump github.com/getkin/kin-openapi from 0.106.0 to 0.107.0 2aedccc @dependabot[bot]
- build(deps): bump golang.org/x/text from 0.3.7 to 0.4.0 c109314 @dependabot[bot]
- build(deps): bump github.com/spf13/cobra from 1.5.0 to 1.6.1 4732c47 @dependabot[bot]
- build(deps): bump github.com/getkin/kin-openapi from 0.103.0 to 0.106.0 62780ec @dependabot[bot]
- build(deps): bump github.com/tdewolff/minify/v2 from 2.12.1 to 2.12.4 351d6b0 @dependabot[bot]
- build(deps): bump github.com/yuin/goldmark from 1.4.15 to 1.5.2 ed930db @dependabot[bot]
- build(deps): bump github.com/fsnotify/fsnotify from 1.5.4 to 1.6.0 05df964 @dependabot[bot]
- build(deps): bump github.com/magefile/mage from 1.13.0 to 1.14.0 9860e0e @dependabot[bot]
- build(deps): bump github.com/evanw/esbuild from 0.15.9 to 0.15.12 2ef60db @dependabot[bot]
Documentation
Build Setup
v0.104.3
What's Changed
Note that none of the fixes below are regressions from v0.104.*; the first one, the GIF fix, comes from v0.101, back when we added support for processing animated GIFs.
v0.104.2
v0.104.1
v0.104.0
Some bug fixes, dependency upgrades and a new $image.Colors
method. This method returns a slice of the most dominant colors in an image. The library we use is implemented by @marekm4 and is both fast and accurate. One use case for this may be to use as a placeholder before the image is loaded, as seen on this Hugo gallery [theme source]. You need a slow enough internet connection to notice this effect so you may want to try this with Chrome's dev console open and throttle the network to slow 3G, which would make it look something like this:
colorsani1.mp4
Bug fixes
- hugofs: Fix glob case-sensitivity bug 281554e @satotake
- server: Fix 404 redirects on Windows f3560aa @bep #10314
Improvements
- Consolidate the glob case logic 5c41653 @bep
- Run go mod tidy 0171fb2 @bep
- resources/images: Add $image.Colors a402811 @bep #10307
- commands: Skip flaky test on CI 08f0984 @bep
- config/security: Allow proxy variables in subcommands 86653fa @sathieu
Dependency Updates
- build(deps): bump github.com/evanw/esbuild from 0.15.8 to 0.15.9 edf9038 @dependabot[bot]
- build(deps): bump github.com/yuin/goldmark from 1.4.14 to 1.4.15 78f49b4 @dependabot[bot]
- build(deps): bump github.com/getkin/kin-openapi from 0.100.0 to 0.103.0 fa4b77e @dependabot[bot]
- build(deps): bump github.com/alecthomas/chroma/v2 from 2.2.0 to 2.3.0 4d909d4 @dependabot[bot]
- build(deps): bump github.com/evanw/esbuild from 0.15.7 to 0.15.8 4eb6d97 @dependabot[bot]
Documentation
v0.103.1
v0.103.0
There are 3 main topics in this release:
- The
hugo server
finally comes with proper 404 support. - You can now use
PostProcess
'ed resources in all file types (e.g. JSON), not just HTML. - We have standardised the archive names for the release archives (as you can see further below). Hugo has since the first version used a rather odd and non-standard mixed case naming of the archive files (e.g.
hugo_0.102.3_OpenBSD-64bit.tar.gz
). We now use the standard GOOS/GOARCH values as-is, which makes it easier for people to script against. To avoid breakage when running on Netlify and similar, we create aliases for the most commonly downloaded Linux-archives on the old format and will continue to do so in the foreseeable future.
Bug fixes
- Fix usage description ab5ce59 @satotake
- scss: Handle single-file sourcemaps correctly 02c89a4 @toothrot #8174
Improvements
- Filter out any duplicate files to post process 8e77bcc @bep #10269
- Support PostProcess for all file types 74daca6 @bep #10269
- server: Add 404 support a5cda5c @bep
- Add
--force
tohugo new
7d40da8 @satotake #9243 - Update stale.yml 5e03de0 @sashashura
Dependency Updates
- build(deps): bump github.com/gobuffalo/flect from 0.2.5 to 0.3.0 1fd4c56 @dependabot[bot]
- build(deps): bump github.com/getkin/kin-openapi from 0.98.0 to 0.100.0 5e2b28d @dependabot[bot]
- build(deps): bump github.com/evanw/esbuild from 0.15.5 to 0.15.7 f2019f0 @dependabot[bot]
- build(deps): bump github.com/yuin/goldmark from 1.4.13 to 1.4.14 475638f @dependabot[bot]