Hugo 0.49: Directory Based Archetypes
Hugo 0.49
brings directory based archetypes and also improves the language handling in hugo new
. This should simplify working with page bundles. One example of this would be how you now can create a new showcase for the Hugo web site.
But this release is also about collections. Go 1.11 gave us variable overwrite support in Go templates. That made it possible to simplify a lot of template constructs, but it also showed some limitations in Hugo’s template functions. So with this release we have:
- added append function to append to collections.
- added group to create custom page groups.
- improved the type support in slice.
This release represents 66 contributions by 9 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, @felicianotech, and @vdanjean 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 37 contributions by 20 contributors. A special thanks to @bep, @kaushalmodi, @AlexChambers, and @shaform for their work on the documentation site.
Hugo now has:
- 28985+ stars
- 441+ contributors
- 265+ themes
Notes
- Remove deprecated
rssURI
f1a00b20 @bep - Remove deprecated flags df4cbbd3 @bep
- Deprecate
Pages.Sort
. Use.ByWeight
2e2e34a9 @bep - When setting
preserveTaxonomyNames
Hugo now really preserves them. Before this release, we would make the first character upper case. If this is the behaviour you want you can use the newstrings.FirstUpper
function.
Enhancements
Templates
- Allow
first
function to return an empty slice cae07ce8 @felicianotech #5235 - Use
safeHTMLAttr
instead ofsafeHTML
for HTML attributes 4f9c109d @felicianotech #5236 - Add
collections.Append
(with aliasappend
) e27fd4c1 @bep #5190 - Improve type handling in
collections.Slice
fe6676c7 @bep #5188 - Add
group
template func 6667c6d7 @bep #4865 - Add
strings.FirstUpper
e5d66074 @bep #5174
Core
- Minor cleaning in the sorting code 2eed35c8 @bep
- Make sure ambiguous lookups in GetPage gets an error 75e54345 @bep #5138
- Allow creating page groups from any page collection cfda13b3 @vdanjean #4865
- Do not FirstUpper taxonomy titles be3ae3ec @Schnouki #5172
- Simplify some code e38e8812 @moorereason
- Add missing error checks 0665a395 @moorereason
- Remove extraneous createStaticFs call 1ed8c363 @moorereason
Other
- Add “go mod download” to CI scripts cf47f43f @bep
- Regenerate CLI docs 3b6bd121 @bep
- Document group 8388cd90 @bep
- Make Data.Integrity be of type template.HTMLAttr fe6a6f27 @bep
- Add directory based archetypes 2650fa77 @bep #4535
- Build on CircleCI outside of GOPATH ef525b15 @felicianotech #5135
- Prevent symbolic links from themes f9168146 @bep
- Update releasenotes_writer.go 4b82f748 @bep
- Add docs for append df50c108 @bep #5190
- Set minifier to KeepEndTags 9b26b548 @onedrawingperday
- Make JSON minification more generic 3dafe206 @zinefer
- Update Mage 37d64634 @bep
- Update dependencies bb2fe814 @bep
- Improve some godoc comments 30bc4ed0 @moorereason
- Update to latest Mage 3b103cb7 @bep
- Remove some duplicate code c15c7da4 @bep
- Update Dockerfile to Go 1.11 bcbe57c6 @zyfdegh #5145
- Init packages once ea8ef573 @bep
- Update script to Go 1.11 293e1235 @bep #5127
- Remove the remains of Go Dep fdf3c3b8 @bep #5115
- Update CONTRIBUTING.md 312d2252 @bep
- Update README.md f627903e @bep
- Fix golint issues 400fe96a @moorereason
- Fix golint godoc issues 3f45e729 @moorereason
- Fix godoc comment e03eb90a @moorereason
- Fix typo in private func name c915d0d3 @moorereason
- Fix golint godoc issues f6f22ad9 @moorereason
- Fix filepath issue in test d970327d @moorereason
- Fix golint issues 0013bea9 @moorereason
- Fix golint godoc issue ffaa73dc @moorereason
- Fix golint godoc issue f8d8c854 @moorereason
- Fix golint issue 10dc87bf @moorereason
- Fix golint issues 7231869b @moorereason
- Fix golint godoc issues 600047ff @moorereason
- Fix golint issues 5f2e1cb8 @moorereason
- Fix golint issues c8ce6504 @moorereason
- Fix most golint issues a53f9623 @moorereason
- Fix golint issues daffeec3 @moorereason
- Fix golint errors b8b91f55 @moorereason
- Fix golint issues f0effac8 @moorereason
- Fix broken Travis config 2cf8fe2e @bep
- Fix error message for go vet 47d4edce @mdhender
Fixes
Улучшить эту страницу