084804447 Update shortcode-templates.md c01b02434 Correct misspelling of 'default' 52a831cca Added missing parenthesis 59e8e660a Fix spelling typos 29ad53c9c Yes, HTML is a valid content format c6b193c6f Update shortcode-templates.md 1f2846e6d Fix typo in output format README 5882f7a4c Fix typo a90a00bb0 Update multilingual.md 62bf0f184 Documentation for Open Graph & Twitter Cards f4d624da3 Document "images", "videos", etc. in front-matter 6a85b5df1 Document anchorize and Resources.Content 04c8a5b0e Fix minor typo in 0.49.2 release note dbe77e948 Release 0.49.2 ea6c9658e Merge branch 'temp492' 85c45b725 Merge branch 'release-0.49.2' 7ad1fba29 releaser: Prepare repository for 0.50-DEV b25bcc3f2 releaser: Add release notes to /docs for release of 0.49.2 78b751b91 releaser: Bump versions for release of 0.49.2 e3f09762c Release 0.49.1 bd5b94558 Merge branch 'temp491' 0007e0661 Merge branch 'release-0.49.1' 74d2f3a6f releaser: Prepare repository for 0.50-DEV bbee7e9d3 releaser: Add release notes to /docs for release of 0.49.1 ae40c89c7 releaser: Bump versions for release of 0.49.1 11079fb48 Add draft statement to FAQ 069b9472f Addin Hokus CMS to frontends list. 6e8850670 Add MediaType docs f3ca6209a Add `languageName` to configuration fd1cde5ea tpl: Add a delimiter parameter to lang.NumFmt c620ff78a Update doc to use proper variable 7317c339a add tools->hugo-elasticsearch description to docs d758ef94a hugolib: Introduce Page.NextPage and Page.PrevPage 9c93ac031 Update installing.md 7c0b5b7f5 Use ISO 639-1 code for examples 9a9e40ba8 Fix spelling 9a6216c18 Hugo 0.49 55aa91185 Merge branch 'temp49' e0a36421e releaser: Prepare repository for 0.50-DEV c07b3b385 releaser: Add release notes to /docs for release of 0.49 c1175a12a releaser: Bump versions for release of 0.49 2966f6254 docs: Document directory based archetypes 73dcd02ed Add showcase archetype folder 0a55ad11b docs: Regenerate CLI docs e09866c2d docs: Document group ef986358a Merge commit '807c551922707fc5ae0eb26e8f01638c0c63fdb3' 681f14fc9 tpl/collections: Allow first function to return an empty slice f6dcc93bc docs: Add docs for append aae528ca3 Merge commit '13e64d72763bf8d6d92d4cdfc15ed45ee9debfab' 02b62294c tpl/strings: Add strings.FirstUpper bf3e61ba3 hugolib: Do not FirstUpper taxonomy titles git-subtree-dir: docs git-subtree-split: 084804447402ab99b51bf49f0da809bee8c16339
14 KiB
date: 2018-09-24 title: "Hugo 0.49: Directory Based Archetypes" description: "Hugo 0.49 brings archetype bundle support and collection goodness." categories: ["Releases"]
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