bd0e15bb6 Optimised images with calibre/image-actions 59830ea44 Remove comments from quickstart code samples 348821b5d Remove image-actions 1cbbd26a9 Update index.md bcf3de764 Update index.md fcf17e6ef Release 0.62.1 0956bde21 Merge branch 'temp621' 28d604756 releaser: Add release notes to /docs for release of 0.62.1 c895f12e7 Fix statement about version installed with apt-get (#854) e96928e38 Updated quickstart to split theme download and theme config add into separate blocks (#967) e099c1ad6 changed ".Title" to ".URL" (#972) bea71280d Fix small typing error (#1001) 9c28c422e Correct hyperlink for 'markdownify' function cf3844a06 Corrected small conjugation mistake (#996) 8b9c1d4f2 Added remarks about additional parameters in ref/relref (#995) ca06c9a56 Fix illegal character in render-link.html example 7a85c789b Update RenderString.md 69df3b17e Update configuration-markup.md 43e9222a2 Revert "Add shortcodes to note comparing with `markdownify`" 2bd5bc2d7 Add shortcodes to note comparing with `markdownify` ddfee60b7 Update configuration-markup.md f87c35fe2 docs: Remove extra double quotation 5ca5cc15f Update index.md 6e457f5ec Update configuration-markup.md 12df3c0fc Update configuration-markup.md 91977fd96 Update configuration-markup.md 377b8954a Update configuration-markup.md 99d691b5e Update hosting-on-render.md ccf855b22 Update index.md a945acc42 Update index.md 7d4f308d6 Fix Netlify config f4caa07f5 Release 0.62.0 79d18276f releaser: Add release notes to /docs for release of 0.62.0 9db1a08d1 Merge commit '8a4005cf2b0ef34265ff8051a6b76226685fc226' 79e556223 docs: More on hooks 5088c54df tpl: Do not return any value in errorf 98c8c8638 tpl: Add a warnf template func 4a9d76cea docs: Regen docshelper 626e53b55 Fix incorrect MIME type from image/jpg to image/jpeg f92f77c5d Preserve HTML Text for link render hooks 6db9c52b1 docs: Footnote 16801db3b Add render template hooks for links and images 0facb823c Merge commit '2e711a28c71e8667258e5ab824f9b9a71c261b0a' 79bf8ed4c markup/tableofcontents: Add config option for ordered list git-subtree-dir: docs git-subtree-split: bd0e15bb6063f7ad4f0c47eb33c8c0c23c962d13
9 KiB
date: 2019-12-23 title: "Hugo Christmas Edition!" description: "Hugo 0.62 brings Markdown Render Hooks. And it's faster!" categories: ["Releases"]
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