Releases: gohugoio/hugo
v0.30.1
This is a bug-fix release with two important fixes.
- Fix hugo -w fa53b13c @bep #3980
- Revert sitemap template change to make the Google validator happy 5109ed520 @bep #3978
Hugo now has:
- 20285+ stars
- 454+ contributors
- 180+ themes
Automated with GoReleaser
Built with go version go1.9.1 linux/amd64
v0.30
Hugo 0.30
is the Race Car Edition. Hugo is already very very fast, but much wants more. So we added Fast Render Mode. It is hard to explain, so start the Hugo development server with hugo server
and start editing. Live reloads just got so much faster! The "how and what" is discussed at length in other places, but the short version is that we now re-render only the parts of the site that you are working on.
The second performance-related feature is a follow-up to the Template Metrics added in Hugo 0.29
. Now, if you add the flag --templateMetricsHints
, we will calculate a score for how your partials can be cached (with the partialCached
template func).
This release also more or less makes the really fast Chroma highlighter a complete alternative to Pygments. Most noteable is the new table linenos
support (7c30e2cb @bep #3915), which makes copy-and-paste code blocks much easier.
This release represents 31 contributions by 10 contributors to the main Hugo code base.
@bep leads the Hugo development with a significant amount of contribution, but also a big shoutout to @moorereason, @digitalcraftsman, and @bmon 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 26 contributions by 15 contributors. A special thanks to @bep, @digitalcraftsman, @moorereason, and @kaushalmodi for their work on the documentation site.
Hugo now has:
- 20195+ stars
- 454+ contributors
- 180+ themes
Notes
- Running
hugo server
will now run with the new "Fast Render Mode" default on. To turn it off, runhugo server --disableFastRender
or setdisableFastRender=true
in your site config. - There have been several fixes and enhancements in the Chroma highlighter. One is that it now creates Pygments compatible CSS classes, which means that you may want to re-generate the stylesheet. See the Syntax Highlighting Doc.
Enhancements
Performance
- Only re-render the view(s) you're working on 60bd332c @bep #3962
- Detect
partialCached
candidates 5800a20a @bep - Move metrics output to the end of the site build b277cb33 @moorereason
Templates
- Output
xmlns:xhtml
only if there are translations available 0859d9df @jamieconnolly - Add
errorf
template function 4fc67fe4 @bmon #3817 - Add
os.FileExists
template function 28188789 @digitalcraftsman #3839 - Add
float
template function 57adc539 @x3ro #3307 - Rework the partial test and benchmarks e2e8bcbe @bep
Other
- Change
SummaryLength
to be configurable (#3924) 8717a60c @bmon #3734 - Replace
make
withmage
in CircleCI build fe71cb6f @bep #3969 - Add table
linenos
support for Chroma highlighter 7c30e2cb @bep #3915 - Replace
make
withmage
8d2580f0 @bep #3937 - Create
magefile
fromMakefile
384a6ac4 @natefinch - Clean up lint in various packages 47fdfd51 @moorereason
Fixes
v0.29
Hugo 0.29
brings Template Metrics by @moorereason. Hugo is very fast, but it is still possible to write ineffective templates. Now these should be easy to identify. Just run:
hugo --templateMetrics
Now, that was the tasty carrot. The real reason this release comes so fast after the last one is to change the default value for the new noHTTPCache
flag, which gives away too much performance to make sense as a default value.
Hugo now has:
- 19817+ stars
- 454+ contributors
- 180+ themes
Notes
Enhancements
Templates
- Add simple template metrics feature b4a14c25 @moorereason
- Set Metrics at creation time b5e1dc58 @bep
- Fix sort order d3681f51 @bep
- Add math.Ceil, Floor, and Round to method mappings 8a69d235 @moorereason
Other
- Split go build in Dockerfile d9697e27 @tjamet
- Update Dockerfile to benefit build cache 09d960f1 @tjamet
- Add git to snap package for GitInfo a3a3f5b8 @ghalse
Automated with GoReleaser
Built with go version go1.9 linux/amd64
v0.28
Hugo 0.28
brings blistering fast and native syntax highlighting from Chroma (fb33d828 @bep #3888). A big thank you to Alec Thomas for taking on this massive task of porting the popular python highlighter Pygments to Go.
See the Updated Documentation for more information about how this works.
Worth mentioning is also the liveReloadPort
flag on hugo server
, which makes it possible to do "live reloads" behind a HTTPS proxy, which makes for very cool remote customer demos.
One example would be a Hugo server running behind a ngrok tunnel:
ngrok http 1313
Then start the Hugo server with:
hugo server -b https://youridhere.ngrok.io --appendPort=false --liveReloadPort=443 --navigateToChanged
The navigateToChanged
flag is slightly unrelated, but it is super cool ...
This release represents 15 contributions by 2 contributors to the main Hugo code base.
Many have also been busy writing and fixing the documentation in hugoDocs,
which has received 9 contributions by 7 contributors. A special thanks to @bep, @i-give-up, @muhajirframe, and @icannotfly for their work on the documentation site.
Hugo now has:
- 19771+ stars
- 454+ contributors
- 180+ themes
Notes
- Hugo now uses Chroma as new default syntax highlighter. This should in most cases work out-of-the box or with very little adjustments. But if you want to continue to use Pygments, set
pygmentsUseClassic=true
in your site config. - We now add a set of "no cache" headers to the responses for
hugo server
, which makes the most sense in most development scenarios. Run withhugo server --noHTTPCache=false
to get the old behaviour.
Enhancements
Templates
- Add
urls.Parse
function 81ed5647 @moorereason #3849 - Add
math.Ceil
,Floor
, andRound
19c59104 @moorereason #3883
Other
- Use Chroma as new default syntax highlighter fb33d828 @bep #3888
- Trim newlines in the hightlight shortcode 0d29a0f7 @bep #3898
- Update
goorgeous
b8fabce2 @bep #3899 - Add
liveReloadPort
flag to server b1804776 @bep #3882 - Add
noHTTPCache
flag to hugo server (default on) 0b34af21 @bep #3897 - Make
noHTTPCache
default on 80c7ea60 @bep #3897
Automated with GoReleaser
Built with go version go1.9 linux/amd64
v0.27.1
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