Releases: gohugoio/hugo
v0.27
Hugo 0.27
comes with fast and flexible Related Content (3b4f17bb @bep #98). To add this to your site, put something like this in your single page template:
{{ $related := .Site.RegularPages.Related . | first 5 }}
{{ with $related }}
<h3>See Also</h3>
<ul>
{{ range . }}
<li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
{{ end }}
</ul>
{{ end }}
The above translates to list the five regular pages mostly related to the current page. See the Related Content Documentation for details and configuration options.
This release represents 37 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, @yihui, and @oneleaftea for their ongoing contributions.
And as always a big thanks to @digitalcraftsman for his relentless work on keeping the documentation and the themes site in pristine condition.
Many have also been busy writing and fixing the documentation in hugoDocs,
which has received 44 contributions by 30 contributors. A special thanks to @bep, @sdomino, @gotgenes, and @digitalcraftsman for their work on the documentation site.
Hugo now has:
- 19464+ stars
- 455+ contributors
- 178+ themes
Notes
- We now only strip p tag in
markdownify
if there is only one paragraph. This allows blocks of paragraphs to be "markdownified" 33ae10b6 @bep #3040
Enhancements
Templates
- Add
time.Duration
andtime.ParseDuration
template funcs f4bf2141 @bep #3828 - Add
cond
(ternary) template func 0462c96a @bep #3860 - Prepare for template metrics d000cf60 @bep
- Add
strings.TrimLeft
andTrimRight
7674ad73 @moorereason - compare, hugolib, tpl: Add
Eqer
interface 08f48b91 @bep #3807 - Only strip p tag in
markdownify
if only one paragraph 33ae10b6 @bep #3040 - Cleanup
strings.TrimPrefix
andTrimSuffix
29a2da05 @moorereason
Output
Core
- Implement "related content" 3b4f17bb @bep #98
- Add
Page.Equals
f0f49ed9 @bep - Rewrite
replaceDivider
to reduce memory allocation 71ae9b45 @bep
Other
- Set up Hugo release flow on
CircleCI
d2249c50 @bep #3779 - Maintain the scroll position if possible 7231d5a8 @yihui #3824
- Add an
iFrame
title to theYouTube
shortcode 919bc921 @nraboy - Remove the theme submodule from /docs ea2cc26b @bep #3791
- Add support for multiple config files via
--config a.toml,b.toml,c.toml
0f9f73cc @jgielstra - Render task list item inside
label
for correct accessibility c8257f8b @danieka #3303 - Normalize
UniqueID
between Windows & Linux 0abdeeef @Shywim
Fixes
Output
- Fix taxonomy term base template lookup f88fe312 @bep #3856
- Fix
published
front matter handling 202510fd @bep #3867
Automated with GoReleaser
Built with go version go1.9 linux/amd64
v0.26
Hugo 0.26
is the Language Style Edition.
This release brings a choice of AP Style or Chicago Style Title Case (8fb594bf #989). You can also now configure Blackfriday to render « French Guillemets » (cb9dfc26 #3725). To enable French Guillemets, put this in your site config.toml
:
[blackfriday]
angledQuotes = true
smartypantsQuotesNBSP = true
Oh, and this release also fixes it so you should see no ugly long crashes no more when you step wrong in your templates (794ea21e).
Hugo 0.26
represents 46 contributions by 11 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, @jorinvo, and @digitalcraftsman for their ongoing contributions. And as always a big thanks to @digitalcraftsman for his relentless work on keeping the documentation and the themes site in pristine condition.
Many have also been busy writing and fixing the documentation in hugoDocs,
which has received 838 contributions by 30 contributors. A special thanks to @rdwatters, @bep, @digitalcraftsman, and @budparr for their work on the documentation site.
This may look like a Waiting Sausage, a barbecue term used in Norway for that sausage you eat while waiting for the steak to get ready. And it is: We're working on bigger and even more interesting changes behind the scenes. Stay tuned!
Hugo now has:
- 18802+ stars
- 457+ contributors
- 175+ themes
Notes
sourceRelativeLinks
has been deprecated for a while and has now been removed. 9891c0fb @bep #3766- The
title
template function and taxonomy page titles now default to following the AP Stylebook for title casing. To override this default to use the old behavior, settitleCaseStyle
toGo
in your site configuration. 8fb594bf @bep #989
Enhancements
Templates
- Use hash for cache key 6cd33f69 @RealOrangeOne #3690
- Add some empty slice tests to intersect e0cf2e05 @bep #3686
Core
- Support
reflinks
starting with a slash dbe63970 @bep #3703 - Make template panics into nice error messages 794ea21e @bep
Other
- Make the
title
case style guide configurable 8fb594bf @bep #989 - Add support for French Guillemets cb9dfc26 @bep #3725
- Add support for French Guillemets c4a0b6e8 @bep #3725
- Switch from fork bep/inflect to markbates/inflect 09907d36 @jorinvo
- Remove unused dependencies from vendor.json 9b4170ce @jorinvo
- Add
--debug
option to be improved on over time aee2b067 @maxandersen - Reduce Docker image size from 277MB to 27MB bfe0bfbb @ellerbrock #3730#3738
- Optimize Docker image size 606d6a8c @ellerbrock #3674
- Add
--trace
to asciidoctor args b60aa1a5 @miltador #3714 - Add script to pull in docs changes ff433f98 @bep
- Add
HasShortcode
deccc540 @bep #3707 - Improve the twitter card template 00b590d7 @bep #3711
- Add
GOEXE
to support building with different versions ofgo
ea5e9e34 @mdhender
Fixes
Templates
- Fix intersect on
[]interface{}
handling 55d0b894 @moorereason #3718
Other
Automated with GoReleaser
Built with go version go1.8.3 darwin/amd64
v0.25.1
This is a bug-fix release with a couple of important fixes.
Hugo now has:
- 18277+ stars
- 456+ contributors
- 170+ themes
Fixes
- Fix union when the first slice is empty dbbc5c48 @bep #3686
- Navigate to changed on CREATE When working with content from IntelliJ IDE, like WebStorm, every file save is followed by two events: "RENAME" and then "CREATE". 7bcc1ce6 @miltador
- Final (!) fix for issue with escaped JSON front matter 7f82b41a @bep #3682
- Fix issue with escaped JSON front matter 84db6c74 @bep #3682
Automated with GoReleaser
Built with go version go1.8.3 darwin/amd64
v0.25
Hugo 0.25
is the Kinder Surprise: It automatically opens the page you're working on in the browser, it adds full AND
and OR
support in page queries, and you can now have templates per language.
If you start with hugo server --navigateToChanged
, Hugo will navigate to the relevant page on save (see animated GIF). This is extremely useful for site-wide edits. Another very useful feature in this version is the added support for AND
(intersect
) and OR
(union
) filters when combined with where
.
Example:
{{ $pages := where .Site.RegularPages "Type" "not in" (slice "page" "about") }}
{{ $pages := $pages | union (where .Site.RegularPages "Params.pinned" true) }}
{{ $pages := $pages | intersect (where .Site.RegularPages "Params.images" "!=" nil) }}
The above fetches regular pages not of page
or about
type unless they are pinned. And finally, we exclude all pages with no images
set in Page params.
This release represents 36 contributions by 12 contributors to the main Hugo code base. @bep still leads the Hugo development with his witty Norwegian humor, and once again contributed a significant amount of additions. But also a big shoutout to @yihui, @anthonyfok, and @kropp for their ongoing contributions. And as always a big thanks to @digitalcraftsman for his relentless work on keeping the documentation and the themes site in pristine condition.
Hugo now has:
- 18209+ stars
- 455+ contributors
- 168+ themes
Enhancements
Templates
- Add
Pages
support tointersect
(AND
) andunion
(ÒR
). This makes thewhere
template func even more powerful. ccdd08d5 @bep #3174 - Add
math.Log
function. This is very handy for creating tag clouds. 34c56677 @artem-sidorenko - Add
WebP
images support 8431c8d3 @bep #3529 - Only show post's own keywords in schema.org da72805a @brunoamaral #2635#2646
- Simplify the
Disqus
template a little bit (#3655) eccb0647 @yihui - Improve the built-in Disqus template (#3639) 2e1e4934 @yihui
Output
- Support templates per site/language. This is for both regular templates and shortcode templates. aa6b1b9b @bep #3360
Core
- Extend the sections API a1d260b4 @bep #3591
- Make
.Site.Sections
return the top level sections dd9b1baa @bep #3591 - Render
404.html
for all languages 41805dca @mitchchn #3598
Other
- Support human-readable
YAML
boolean values inundraft
1039356e @kropp hugo import jekyll
support nested_posts
directories 7ee1f25e @coderzh #1890#1911- Update
Dockerfile
and add Docker optimizations 118f8f7c @ellerbrock - Add Blackfriday
joinLines
extension support (#3574) a5440496 @choueric - add
--initial-header-level=2
to rst2html (#3528) bfce30d8 @frankbraun - Support open "current content page" in browser c825a731 @bep #3643
- Make
--navigateToChanged
more robust on Windows 30e14cc3 @anthonyfok #3645 - Remove the docs submodule 31393f60 @bep #3647
- Use
example.com
as homepage for new theme aff1ac32 @anthonyfok
Fixes
Templates
Other
- Fix handling of
JSON
front matter with escaped quotes e10e51a0 @bep #3661 - Fix typo in code comment 56d82aa0 @dvic
Automated with @goreleaser
Built with go version go1.8.3 darwin/amd64
v0.24.1
This release fixes some important archetype-related regressions from the recent Hugo 0.24-relase.
Fixes
- Fix archetype regression when no archetype file 4294dd8d @bep #3626
- Preserve shortcodes in archetype templates b63e4ee1 @bep #3623
- Fix handling of timezones with positive UTC offset (e.g., +0800) in TOML 0744f81e @bep #3628
Enhancements
Automated with @goreleaser
Built with go version go1.8.3 darwin/amd64
v0.24
This is The Revival of the Archetypes!
"A feature that could be the name of the next Indiana Jones movie deserves its own release," says @bep.
Hugo now handles the archetype files as Go templates. This means that the issues with sorting and lost comments are long gone. This also means that you will have to supply all values, including title and date. But this also opens up a lot of new windows.
A fictional example for the section newsletter
and the archetype file archetypes/newsletter.md
:
---
title: "{{ replace .TranslationBaseName "-" " " | title }}"
date: {{ .Date }}
draft: true
---
**Insert Lead paragraph here.**
<!--more-->
## New Cool Posts
{{ range first 10 ( where .Site.RegularPages "Type" "cool" ) }}
* {{ .Title }}
{{ end }}
And then create a new post with:
hugo new newsletter/the-latest-cool.stuff.md
Note: the site will only be built if the .Site
is in use in the archetype file, and this can be time consuming for big sites.
Hot Tip: If you set the newContentEditor
configuration variable to an editor on your PATH
, the newly created article will be opened.
The above newsletter type archetype illustrates the possibilities: The full Hugo .Site
and all of Hugo's template funcs can be used in the archetype file.
Also, Hugo now supports archetype files for all content formats, not just markdown.
Hugo now has:
- 17839+ stars
- 493+ contributors
- 166+ themes
Notes
- Archetype files now need to be complete, including
title
anddate
. - The
-f
(format) flag inhugo new
is removed: Now use the archetype files as is.
Enhancements
- Support extension-less media types. The motivation behind this change is to support Netlify's
_redirects
files, so we can generate server-side redirects for the Hugo docs site. See this commit to see how we configured that. 0f40e1fa @bep #3614 - Add
disableAliases
516e6c6d @bep #3613 - Support non-md files as archetype files 19f2e729 @bep #3597 #3618
- Identify extension-less text types as text c43b512b @bep #3614
- Add
.Site
to the archetype templates 662e12f3 @bep #1629 - Use archetype template as-is as a Go template 422057f6 @bep #452 #1629
- Update links to new discuss URL 4aa12390 @bep
Fixes
- Fix error handling for
JSON
front matter fb53987a @bep #3610 - Fix handling of quoted brackets in
JSON
front matter 3183b9a2 @bep #3511
Automated with @goreleaser
Built with go version go1.8.3 darwin/amd64
v0.23
Hugo 0.23
is mainly a release that handles all the small changes needed to get Hugo moved to a GitHub organisation: gohugoio, but it also contains a couple of important fixes that makes this an update worth-while for all.
Hugo now has:
- 17739+ stars
- 494+ contributors
- 165+ themes
Fixes
- Fix handling of duplicate footnotes a9e551a1 @bep #1912
- Add support for spaces in project folder for
GitInfo
#3533 #3552
GitHub organisation related changes
- Update layout references to gohugoio/hugo 66d4850b @bep
- Update content references to gohugoio/hugo 715ff1f8 @bep
- Add note on updates for rpm-based distros 52a0cea6 @daftaupe
- Update logo link in README ccb8300d @bep
- Remove docs building from CI builds 214dbdfb @bep
- Adjust docs path 729be807 @bep
- Add docs as submodule 6cee0dfe @bep
- Update Gitter link in README fbb25014 @bep
- Change Windows build badge link, take #3 86543d6a @bep
- Update Windows build link e6ae32a0 @bep
- Update links in CONTRIBUTING.md due to the org transition 95386544 @digitalcraftsman
- Update source path in Dockerfile due to the org transition 7b99fb9f @digitalcraftsman
- Update clone folder in appveyor.yml due to the org transition d531d17b @digitalcraftsman
- Update import path in snapcraft.yaml due to the org transition 9266bf9d @digitalcraftsman
- Run gofmt to get imports in line vs gohugoio/hugo 873a6f18 @bep
- Update Makefile vs gohugoio/hugo f503d76a @bep
- Update README to point to gohugoio/hugo 93643860 @bep
- Update examples to point to gohugoio/hugo db46bcf8 @bep
- Update textual references in Go source to point to gohugoio/hugo c17ad675 @bep
- Update import paths to gohugoio/hugo d8717cd4 @bep
Automated with @goreleaser
Built with go version go1.8.3 darwin/amd64
v0.22.1
Hugo 0.22.1
fixes a couple of issues reported after the 0.22 release Monday. Most importantly a fix for detecting regular subfolders below the root-sections.
Also, we forgot to adapt the permalink settings
with support for nested sections, which made that feature less useful than it could be.
With this release you can configure permalinks with sections like this:
First level only:
[permalinks]
blog = ":section/:title"
Nested (all levels):
[permalinks]
blog = ":sections/:title"
Fixes
- Fix section logic for root folders with subfolders a30023f5 @bep #3586
- Support sub-sections in permalink settings 1f26420d @bep #3580
- Adjust rlimit to 64000 ff54b6bd @bep #3582
- Make error on setting rlimit a warning only 629e1439 @bep #3582
- Revert: Remove the rlimit tweaking on macOS 26aa06a3 @bep #3582
Automated with @goreleaser
Built with go version go1.8.3 darwin/amd64
v0.22
Hugo 0.22
brings nested sections, by popular demand and a long sought after feature (#465). We are still low on documentation for this great feature, but @bep has been kind enough to accompany his implementation with a demo site.
This release represents 58 contributions by 10 contributors to the main Hugo code base. Since last release Hugo has gained 420 stars and 2 additional themes.
@bep still leads the Hugo development with his witty Norwegian humor, and once again contributed a significant amount of additions. But also a big shoutout to @bogem, @moorereason, and @onedrawingperday for their ongoing contributions. And as always big thanks to @digitalcraftsman for his relentless work on keeping the documentation and the themes site in pristine condition.
Hugo now has:
- 17576+ stars
- 455+ contributors
- 165+ themes
Other Highlights
.Site.GetPage
can now also be used to get regular pages (#2844):
{{ (.Site.GetPage "page" "blog" "mypost.md" ).Title }}
Also, considerable work has been put into writing automated benchmark tests for the site builds, and we're happy to report that although this release comes with fundamental structural changes, this version is -- in general -- even faster than the previous. It’s quite a challenge to consistently add significant new functionality and simultaneously maintain the stellar performance Hugo is famous for.
Notes
.Site.Sections
is replaced. We have reworked how sections work in Hugo, they can now be nested and are no longer taxonomies. If you use the old collection, you should get detailed upgrade instructions in the log when you run hugo
. For more information, see this demo site.
Enhancements
Templates
- Add
uint
support toIn
b82cd82f @moorereason - Support interfaces in
union
204c3a9e @moorereason #3411 - Add
uniq
function e28d9aa4 @adiabatic - Handle
template.HTML
and friends inToInt
4113693a @moorereason #3308
Core
- Make the
RSS feed
use the date for the node it represents f1da5a15 @bep #2708 - Enable
nested sections
b3968939 @bep #465 - Add test for "no 404" in
sitemap
8aaec644 @bep #3563 - Support regular pages in
.Site.GetPage
e0c2e798 @bep #2844
#3082
Performance
- Add site building benchmarks 8930e259 @bep #3535
- Add a cache to
GetPage
which makes it much faster 50d11138 @bep - Speed up
GetPage
fbb78b89 @bep #3503 - Add BenchmarkFrontmatterTags 3d9c4f51 @bep #3464
- Add
benchSite.sh
to make it easy to run Hugo performance benchmarks d74452cf @bep - Cache language config 4aff2b6e @bep
- Temporarily revert to BurntSushi for
TOML
front matter handling; it is currently much faster 0907a5c1 @bep #3541 #3464 - Add a simple partitioned lazy cache 87203139 @bep
Other
- Add
noindex
tag to HTML generated by Hugo aliases d5ab7f08 @onedrawingperday - Update Go versions bde807bd @bep
- Remove the
rlimit
tweaking onmacOS
bcd32f10 @bep #3512
Docs
- Rewrite “Archetypes” article @davidturnbull #3543
- Remove Unmaintaned Frontends from Tools. f41f7282 @onedrawingperday
Fixes
Core
- Improve
live-reload
on directory structure changes making removal of directories or pasting new content directories into/content
just work fe901b81 @bep #3570 - Respect
disableKinds=["sitemap"]
69d92dc4 @bep #3544 - Fix
disablePathToLower
regression 5be04486 @bep #3374 - Fix
ref
/relref
issue with duplicate base filenames 612f6e3a @bep #2507
Docs
Automated with @goreleaser
Built with go version go1.8.3 darwin/amd64
v0.21
Hugo 0.21
brings full support for shortcodes per Output Format (#3220), the last vital piece of that puzzle. This is especially useful for Google AMP
with its many custom media tags.
This release represents 126 contributions by 29 contributors to the main Hugo code base. Since last main release Hugo has gained 850 stars and 7 additional themes.
Hugo now has:
- 17156+ stars
- 457+ contributors
- 163+ themes
@bep leads the Hugo development with a significant amount of contributions, but also a big shoutout to @moorereason, @bogem, and @munnerz for their ongoing contributions. And as always a big thanks to @digitalcraftsman for his relentless work on keeping the documentation and the themes site in pristine condition.
Other Highlights
On a more technical side, @moorereason and @bep have introduced namespaces for Hugo's many template funcs (#3042 ). There are so many now, and adding more into that big pile would be a sure path toward losing control. Now they are nicely categorised into namespaces with its own tests and examples, with an API that the documentation site can use to make sure it is correct and up-to-date.
Notes
- The deprecated
.Extension
,.Now
and.TargetPath
will nowERROR
544f0a63 @bep - The config settings and flags
disable404
,disableRSS
,disableSitemap
,disableRobotsTXT
are now deprecated. UsedisableKinds
. 5794a265 @bep #3345
Enhancements
Templates
- Log a WARNING on wrong usage of
IsSet
38661c17 @moorereason #3092 - Add support for ellipsed paginator navigator, making paginators with lots of pages more compact b6ea492b @bep #3466
- Add support for interfaces to
intersect
f1c29b01 @moorereason #1952 - Add
NumFmt
function 93b3b138 @moorereason #1444 - Add template function namespaces #3418 #3042 @moorereason @bep
- Add translation links to the default sitemap template 90d3fbf1 @rayjolt #2569
- Allow text partials in HTML templates and the other way around 1cf29200 @bep #3273
Output
- Refactor site rendering with an "output format context". In this release, this is used for shortcode handling only, but this paves the way for future niceness 1e4d082c @bep #3397 2bcbf104 @bep #3220
Core
- Handle
shortcode
perOutput Format
af72db80 @bep #3220 - Improve shortcode error message 58d9cbd3 @bep
- Avoid
index.md
in/index/index.html
fea4fd86 @bep #3396 - Make missing
GitInfo
aWARNING
5ad2f176 @bep #3376 - Prevent decoding
pageParam
in common cases e98f885b @bogem - Ignore non-source files on partial rebuild b5b6e81c @xofyarg #3325
- Log
WARNING
only on unknown/data
files ab692e73 @bep #3361 - Avoid processing the same notify event twice 3b677594 @bep
- Only show
rssURI
deprecationWARNING
if it is actually set cfd3af8e @bep #3319
Docs
- Add documentation on slug translation 635b3bb4 @xavib
- Replace
cdn.mathjax.org
withcdnjs.cloudflare.com
4b637ac0 @takuti - Add notes about some output format behaviour 162d3a58 @jpatters
- Add
txtpen
as alternative commenting service 7cdc244a @rickyhan
Other
- Embed
Page
inWeightedPage
ebf677a5 @bep #3435 - Improve the detection of untranslated strings a40d1f6e @bogem #2607
- Make first letter of the Hugo commands flags' usage lowercase f0f69d03 @bogem
- Import
Octopress
image tag inJekyll importer
5f3ad1c3 @buynov
Fixes
Templates
Output
- Fix output format mixup in example 10287263 @bep #3481
- Fix base theme vs project base template logic 077005e5 @bep #3323
Core
- Render
404
in default language only 154e18dd @mitchchn #3075 - Fix
RSSLink
vsRSS
Output Format
e682fcc6 @bep #3450 - Add default config for
ignoreFiles
, making that option work when running in server mode 42f4ce15 @chaseadamsio - Fix output formats override when no outputs definition given 6e2f2dd8 @bep #3447
- Fix handling of zero-length files 0e87b18b @bep #3355
- Must recreate
Paginator
on live-reload 45c74526 @bep #3315
Docs
- Fix incorrect path in
templates/list
27e88154 [@MunifTanjim](...