This is a bug-fix release with a couple of important fixes.
Assets
29
This is a bug-fix release with a couple of important fixes.
- hugolib/filesystems: Fix typo in test suite 49e6c8cb @panakour
- Fix class collector when running with --minify f37e77f2 @bep #7161
- related: Fix toLower 27af5a33 @bep #7198
- Fix broken test b3c82575 @bep
- tpl/tmplimpl/template: Change defer RLock to RUnlock 5146dc61 @BurtonQin
- hugolib: Add Unlock before panic 736f84b2 @BurtonQin
- docs: Fix typo in Hugo's Security Model cd4d8202 @sensimevanidus
- deps: Update go-org to v1.1.0 2b28e5a9 @niklasfasching
- commands: Modify gen chromastyles to output all CSS classes 102ec2da @acahir #7167
- deps: Update to goldmark v1.1.28 feaa582c @bep #7113
- Fix query parameter handling in server fast render mode ee67dbef @bep #7163
Assets
29
It's Easter, a time for mysteries and puzzles. And at first glance, this Hugo release looks a little mysterious. The core of it is a mind-twister:
{{ $css := resources.Get "css/main.css" }}
{{ $css = $css | resources.PostCSS }}
{{ if hugo.IsProduction }}
{{ $css = $css | minify | fingerprint | resources.PostProcess }}
{{ end }}
<link href="{{ $css.RelPermalink }}" rel="stylesheet" />
The above uses the new resources.PostProcess template function which tells Hugo to postpone the transformation of the Hugo Pipes chain to after the build, allowing the build steps to use the build output in /public
as part of its processing.
The prime current use case for the above is CSS pruning in PostCSS. In simple cases you can use the templates as a base for the content filters, but that has its limitations and can be very hard to setup, especially in themed configurations. So we have added a new writeStats configuration that, when enabled, will write a file named hugo_stats.json
to your project root with some aggregated data about the build, e.g. list of HTML entities published, to be used to do CSS pruning.
This release represents 20 contributions by 10 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, @jaywilliams, and @satotake 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 @davidsneighbour 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 14 contributions by 7 contributors. A special thanks to @bep, @coliff, @dmgawel, and @jasikpark for their work on the documentation site.
Hugo now has:
- 43052+ stars
- 438+ contributors
- 302+ themes
Enhancements
Templates
- Extend Jsonify to support options map 8568928a @moorereason
- Extend Jsonify to support optional indent parameter 1bc93021 @moorereason #5040
Other
- Regen docs helper b7ff4dc2 @bep
- Collect HTML elements during the build to use in PurgeCSS etc. 095bf64c @bep #6999
- Update to latest emoji package 7791a804 @QuLogic
- Update hosting-on-aws-amplify.md c774b230 @Helicer
- Add basic "post resource publish support" 2f721f8e @bep #7146
- Typo correction 7eba37ae @fekete-robert
- Use semver for min_version per recommendations efc61d6f @jaywilliams
- Updateto gitmap v1.1.2 4de3ecdc @dragtor #6985
- Add data context to the key in ExecuteAsTemplate" c9dc316a @bep #7064
Fixes
Other
- Fix hugo mod vendor for regular file mounts d8d6a25b @bep #7140
- Revert "Revert "common/herrors: Fix typos in comments"" 9f12be54 @bep
- Fix typos in comments" 4437e918 @bep
- Fix typos in comments 1123711b @rnazmo
- Fix TrimShortHTML 9c998753 @satotake #7081
- Fix IsDescendant/IsAncestor for overlapping section names 4a39564e @bep #7096
- fix typo in getting started b6e097cf @matrixise
- Fix _build.list.local logic 523d5194 @bep #7089
- Fix cache reset for a page's collections on server live reload cfa73050 @bep #7085
Assets
29
Assets
29
This is a bug-fix release with one important fix.
Assets
29
This is a bug-fix release with one important fix.
Assets
29
This release (finally) brings minify configuration, a big thanks to @satotake for that contribution. See Configure Minify for details.
We have also extended the Page Build Options to allow fully navigable headless sections.
This release represents 17 contributions by 6 contributors to the main Hugo code base.@bep leads the Hugo development with a significant amount of contributions, but also a big shoutout to @evankanderson, @QuLogic, and @le0tan 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 @davidsneighbour 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 3 contributions by 3 contributors.
Hugo now has:
- 42462+ stars
- 439+ contributors
- 300+ themes
Enhancements
Other
- Some minify configuration adjustments 7204b354 @bep
- Add minify config 574c2959 @satotake #6750#6892
- Allow headless bundles to list pages via $page.Pages and $page.RegularPages 99958f90 @bep #7075
- Update to Go 1.14.1 and 1.13.9 1d91d8e1 @bep #7078
- Pass directory name to filters in LstatIfPossible in the same way as Readdir cc2a5d52 @evankanderson
- Update to goldmark 1.1.25. 52c159c4 @QuLogic
- Add workaround for regular CSS imports in SCSS 1a8af7d4 @bep #7059
- Add .RegularPagesRecursive 03b93bb9 @bep #6411
- Add data context to the key in ExecuteAsTemplate 18cb21ff @bep #7046
- Improve Tailwind/PostCSS error messages df298558 @bep #7041#7042
- Update Blackfriday b1106f87 @bep #7039
- Add languageDirection to language configuration 5914f91b @le0tan #6550
Fixes
Other
Assets
29
Some minor fixes:
- metrics: Fix --templateMetricsHints 5eadc4c0 @bep #7048
- resources: Add data context to the key in ExecuteAsTemplate 18cb21ff @bep #7046
- Improve Tailwind/PostCSS error messages df298558 @bep #7041#7042
- deps: Update Blackfriday b1106f87 @bep #7039
- resources: Try to fix a Go 1.15 go vet error c0177fe2 @bep
- Add languageDirection to language configuration 5914f91b @le0tan #6550
Assets
29
The two main items in Hugo 0.67.0 is custom HTTP header support in hugo server
and incldue/exclude filters for Hugo Deploy.
Being able to configure HTTP headers in your development server means that you can now verify how your site behaves with the intended Content Security Policy settings etc., e.g.:
[server]
[[server.headers]]
for = "/**.html"
[server.headers.values]
X-Frame-Options = "DENY"
X-XSS-Protection = "1; mode=block"
X-Content-Type-Options = "nosniff"
Referrer-Policy = "strict-origin-when-cross-origin"
Content-Security-Policy = "script-src localhost:1313"
Note: This release also changes how raw HTML files inside /content is processed to be in line with the documentation. See #7030.
This release represents 7 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 @satotake, @sams96, and @davidejones 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 @davidsneighbour 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 5 contributions by 5 contributors. A special thanks to @bep, @psliwka, @digitalcraftsman, and @jasikpark for their work on the documentation site.
Hugo now has:
- 42176+ stars
- 439+ contributors
- 301+ themes
Enhancements
Other
- Doument the server config 63393230 @bep
- Support unComparable args of uniq/complement/in 8279d2e2 @satotake #6105
- Add HTTP header support for the dev server 10831444 @bep #7031
- Add include and exclude support for remote 51e178a6 @davidejones
Fixes
Templates
Other
Assets
29
This release adds inline @import
support to resources.PostCSS
, with imports relative to Hugo's virtual, composable file system. Another useful addition is the new build
configuration section. As an example in config.toml
:
[build]
useResourceCacheWhen = "always"
The above will tell Hugo to always use the cached build resources inside resources/_gen
for the build steps requiring a non-standard dependency (PostCSS and SCSS/SASS). Valid values are never
, always
and fallback
(default).
This release represents 27 contributions by 8 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, @carlmjohnson, and @sams96 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 @davidsneighbour 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 5 contributors. A special thanks to @bep, @nantipov, @regisphilibert, and @inwardmovement for their work on the documentation site.
Hugo now has:
- 41984+ stars
- 439+ contributors
- 299+ themes
Enhancements
Templates
- Change error message on missing resource d7798906 @sams96 #6942
- Add math.Sqrt d184e505 @StarsoftAnalysis #6941
Other
- Skip some tests on CircleCI 6a34f88d @bep
- {{ in }} should work with html.Template type ae383f04 @carlmjohnson #7002
- Regen CLI docs ee31e61f @bep
- Add --all flag to hugo mod clean 760a87a4 @bep
- Add build.UseResourceCacheWhen 3d3fa5c3 @bep #6993
- Update dependency list in README.md ee3d0213 @anthonyfok
- Add full filename to image when processing fails 305ce1c9 @bep #7000
- Update dependency list in README 449deb7f @anthonyfok
- Add basic @import support to resources.PostCSS b66d38c4 @bep #6957#6961
- Implement include/exclude filters for deploy 05a74eae @vangent #6922
- Update to Go 1.14 and 1.13.8 33ae6210 @bep #6958
- Add hugo.IsProduction function 1352bc88 @hcwong #6873
- Apply missing go fmt 76b2afe6 @bep
Fixes
Output
Core
- Fix error handling in page collector 3e9db2ad @bep #6988
- Fix 2 Paginator.Pages taxonomy regressions 7ef5a4c8 @bep #6921#6918
- Fix deletion of orphaned sections a70bbd06 @bep #6920
Other
- Fix ref/relref short lookup for pages in sub-folder 8947c3fa @bep #6952
- Fix ref/relRef regression for relative refs from bundles 1746e8a9 @bep #6952
- Fix potential infinite recursion in server change detection 6f48146e @bep #6986
- Fix rebuild logic when editing template using a base template b0d85032 @bep #6968
- Fix panic when home page is drafted 0bd6356c @bep #6927
- Fix goldmark toc rendering ca68abf0 @satotake #6736#6809
- Fix crashes for 404 in IsAncestor etc. a524124b @bep #6931
- Fix panic in 404.Parent 4c2a0de4 @bep #6924