Hugo Christmas Edition!
From all of us to all of you, a very Merry Christmas – and Hugo 0.62.0
! This version brings Markdown Render Hooks. This gives you full control over how links and images in Markdown are rendered without using any shortcodes. With this, you can get Markdown links that work on both GitHub and Hugo, resize images etc. It is a very long sought after feature, that has been hard to tackle until we got Goldmark, the new Markdown engine, by @yuin. When you read up on this new feature in the documentation, also note the new .RenderString method on Page
.
Adding these render hooks also had the nice side effect of making Hugo faster and more memory effective. We could have just added this feature on top of what we got, getting it to work. But you like Hugo’s fast builds, you love instant browser-refreshes on change. So we had to take a step back and redesign how we detect “what changed?” for templates referenced from content files, either directly or indirectly. And by doing that we greatly simplified how we handle all the templates. Which accidentally makes this version the fastest to date. It’s not an “every site will be much faster” statement. This depends. Sites with many languages and/or many templates will benefit more from this. We have benchmarks with site-building showing about 15% improvement in build speed and memory efficiency.
This release represents 25 contributions by 5 contributors to the main Hugo code base. @bep leads the Hugo development with a significant amount of contributions, but also a big shoutout to @gavinhoward, @niklasfasching, and @zaitseff 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 8 contributions by 5 contributors. A special thanks to @bep, @DirtyF, @pfhawkins, and @bubelov for their work on the documentation site.
Also a big shoutout and thanks to the very active and helpful moderators on the Hugo Discourse, making it a first class forum for Hugo questions and discussions.
Hugo now has:
- 40362+ stars
- 440+ contributors
- 284+ themes
Notes
- Ace and Amber support is now removed from Hugo. See #6609 for more information.
- The
markdownify
template function does not, yet, support render hooks. We recommend you look at the new and more powerful .RenderString method onPage
. - If you have output format specific behaviour in a template used from a content file, you must create a output format specific template, e.g.
myshortcode.amp.html
. This also applies to the new rendering hooks introduced in this release. This has been the intended behaviour all the time, but a failing test (now fixed) shows that the implementation of this has not been as strict as specified, hence this note. - The
errorf
does not return any value anymore. This means that the ERROR will just be printed to the console. We have also added awarnf
template func.
Enhancements
Templates
- Do not return any value in errorf 50cc7fe5 @bep #6653
- Add a warnf template func 1773d71d @bep #6628
- Some more params merge adjustments ccb1bf1a @bep #6633
- Get rid of the custom template truth logic d20ca370 @bep #6615
- Add some comments 92c7f7ab @bep
Core
Other
- Update Goldmark to v1.1.18 1fb17be9 @bep #6649
- Update go-org 51d89dab @niklasfasching
- More on hooks c8bfe47c @bep
- Update to Goldmark v1.1.17 04536838 @bep #6641
- Regen docshelper 55c29d4d @bep
- Preserve HTML Text for image render hooks a67d95fe @bep #6639
- Update Goldmark eef934ae @bep #6626
- Preserve HTML Text for link render hooks 00954c5d @bep #6629
- Footnote 3e316155 @bep
- Add render template hooks for links and images e625088e @bep #6545#4663#6043
- Enhance accessibility to issues 0947cf95 @peaceiris #6233
- Re-introduce the correct version of Goldmark 03d6960a @bep
- Rework template handling for function and map lookups a03c631c @bep #6594
- Create lightweight forks of text/template and html/template 167c0153 @bep #6594
- Add config option for ordered list 4c804319 @gavinhoward
Fixes
Templates
Core
Other
Улучшить эту страницу