Hugo

Latest version: v0.127.0

Safety actively analyzes 640549 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 17 of 47

0.93.0

**Markdown diagrams and code block render hooks.** Now it's possible create custom templates for Markdown code blocks, either for all or just for specific programming languages. This can also be used to render diagrams from Markdown code blocks. We provide GoAT (Go ASCII Tool) natively from Hugo, but you can also add your own template to get [Mermaid](https://github.blog/2022-02-14-include-diagrams-markdown-files-mermaid/) support. The implementation of GoAT is a Go implementation by blampe of [markdeep.mini.js](http://casual-effects.com/markdeep/)' diagrams. See the [diagram documentation](https://gohugo.io/content-management/diagrams/) for details.

This means that you can write diagrams as text directly into diagrams, so this:

`
goat
. . . .--- 1 .-- 1 / 1
/ \ | | .---+ .-+ +
/ \ .---+---. .--+--. | '--- 2 | '-- 2 / \ 2
+ + | | | | ---+ ---+ +
/ \ / \ .-+-. .-+-. .+. .+. | .--- 3 | .-- 3 \ / 3
/ \ / \ | | | | | | | | '---+ '-+ +
1 2 3 4 1 2 3 4 1 2 3 4 '--- 4 '-- 4 \ 4


`

Will be rendered as:

![Large Nodes](https://gohugo.io/img/examples/trees.svg)

Also new in this release are:

* The new CLI flag `--printUnusedTemplates` which prints templates not being invoked during the build.
* The new method `$image.Crop` allows images to be cropped without being resized (thanks johnsvenn for the implementation).

Notes

* We have renamed some command line flags for consistency: --i18n-warnings to printI18nWarnings, --path-warnings, --print-men to --printPathWarnings, --printMemoryUsage.
* Finally remove deprecated Page methods 9563c7d1 bep 4117

This release represents **107 contributions by 13 contributors** to the main Hugo code base. bep leads the Hugo development with a significant amount of contributions, but also a big shoutout to jmooring and moorereason for their ongoing contributions. And thanks to digitalcraftsman for his ongoing work on keeping the themes site in pristine condition.

Many have also been busy writing and fixing the documentation in [hugoDocs](https://github.com/gohugoio/hugoDocs),
which has received **7 contributions by 5 contributors**. A special thanks to jmooring, LukeDeWaal, andrewmjorda, and chalin for their work on the documentation site.

Hugo now has:

* 57328+ [stars](https://github.com/gohugoio/hugo/stargazers)
* 429+ [contributors](https://github.com/gohugoio/hugo/graphs/contributors)
* 416+ [themes](http://themes.gohugo.io/)


Changes

* docs: Regenerate docs helper 12d00d28 bep
* markup/highlight: Ignore HL_lines_parsed in the gen docs 260ff137 bep
* cod: Regen CLI docs 14915a0c bep
* tpl/diagrams: Rename the SVG accessor to Wrapped fd0c1a5e bep
* markup/highlight: Rework the return value from HighlightCodeblock 3ad39001 bep 9573
* tpl/transform: Add CanHighlight 39261b68 bep 9573
* Rename Codeowners() to CodeOwners() cff14144 bep
* tpl/diagrams: Rename Body to Inner 5f671515 bep
* CodeblockContext method renames f7109771 bep 9577
* build(deps): bump github.com/tdewolff/minify/v2 from 2.9.29 to 2.10.0 e1f69691 dependabot[bot]
* markup/goldmark: Adjust test for Windows 5f65c17a bep
* markup/goldmark: Improve attributes vs options 579ff9b6 bep 9571
* markup/goldmark: Add Position to CodeblockContext 928a8969 bep 9574
* markup/goldmark: Unify some code block tests 2e54c009 bep
* Remove the trailing new line in .Code 10928a4f bep 9572
* markup/goldmark: Rename extension struct afd63bf7 bep
* build(deps): bump github.com/gobuffalo/flect from 0.2.3 to 0.2.4 228126b7 dependabot[bot]
* markup/goldmark: Use Ordinal to create default lineanchors 0f80be34 bep 9567
* build(deps): bump github.com/gorilla/websocket from 1.4.2 to 1.5.0 78afdb88 dependabot[bot]
* build(deps): bump github.com/sanity-io/litter from 1.5.1 to 1.5.2 3ed83227 dependabot[bot]
* Move the Goat template to the correct place 1a257bb2 bep 7765
* build(deps): bump google.golang.org/api from 0.63.0 to 0.70.0 97514f17 dependabot[bot]
* Update error message about failed menus in config.toml 0df096b8 RheingoldRiver
* build(deps): bump github.com/getkin/kin-openapi from 0.85.0 to 0.90.0 308ad611 dependabot[bot]
* Add test for line anchor attributes with code fences 6bffcdbd kaushalmodi
* build(deps): bump github.com/evanw/esbuild from 0.14.22 to 0.14.23 7248f431 dependabot[bot]
* Add Markdown diagrams and render hooks for code blocks 08fdca9d bep 7765 9538 9553 8520 6702 9558
* build(deps): bump github.com/aws/aws-sdk-go from 1.41.14 to 1.43.5 2c20f5bc dependabot[bot]
* build(deps): bump github.com/google/go-cmp from 0.5.6 to 0.5.7 723b2c48 dependabot[bot]
* Add support for CODEOWNERS 06bac57a marshall007 9474
* Remove Viper as a dependency ec8b767f bep
* helpers: Allow hyphens in UnicodeSanitize 6407b2cd moorereason 7288
* Change `disqus_config` to `window.disqus_config` 6ff39fd9 Akimon658
* deps: Update github.com/spf13/cobra v1.2.1 => v1.3.0 96c0bdf3 anthonyfok
* Add page.Store e97d3c64 bep 9546
* Allow images to be cropped without being resized 7732da9f johnsvenn 9499
* commands: Fix server panic regression aebde49b bep 9518 9530 9539
* markup/goldmark: Add BenchmarkCodeblocks 4ada0941 bep
* deps: Update github.com/gohugoio/localescompressed v0.14.0 => v0.15.0 bddcfd91 jmooring 9446
* deps: Update github.com/yuin/goldmark v1.4.4 => v1.4.7 d485f954 bep 9397
* modules: Add modules.Workspace config for Go 1.18 a87be597 bep 9525
* Update stale.yml b0eea007 bep 9522
* Update stale.yml ef8b781b bep 9522
* github: Configure stale to be run manually 3136ff67 bep 9522
* tpl/partials: Fix recently introduced deadlock in partials cache 92980819 bep 9519
* tpl/partials: Add some more partials to BenchmarkIncludeCached 667f3a4b bep
* deps: Update github.com/evanw/esbuild v0.14.11 => v0.14.22 c061b253 bep
* tpl/partials: Make sure a cached partial is invoked only once 0927cf73 bep 4086 9506
* build(deps): bump github.com/rogpeppe/go-internal from 1.8.0 to 1.8.1 26a5e89f dependabot[bot]
* build(deps): bump github.com/magefile/mage from 1.11.0 to 1.12.1 e9fa7e81 dependabot[bot]
* markup/goldmark: Exclude event attributes from markdown render hook ff545f42 jmooring 9511
* markup/goldmark: Fix mangling of headers/links in render hooks b2a827c5 bep 9504
* markup/goldmark: Add a render hook benchmark 77c7059f bep 9504
* Fix BenchmarkCascadeTarget f4c90bd6 bep
* metrics: Add cached count tracking d1622833 moorereason 8375
* tpl: Remove TODO comment ea6bcd69 bep
* Add --printUnusedTemplates f2e7b49a bep 9502
* deps: Update github.com/tdewolff/minify/v2 v2.9.22 => v2.9.29 923419d7 jmooring 9244 9132
* commands: Rename --i18n-warnings to printI18nWarnings 837fdfdf bep
* commands: Rename --path-warnings, --print-men to --printPathWarnings, --printMemoryUsage 6819feab bep
* deps: Update github.com/alecthomas/chroma v0.9.4 => v0.10.0 ea54a99c bep
* Finally remove deprecated Page methods 9563c7d1 bep 4117
* tpl: Use go:embed to load internal templates b0a9cf0a bep 8297
* releaser: Prepare repository for 0.93.0-DEV 9433cc25 bep
* releaser: Bump versions for release of 0.92.2 cdf6a0d6 bep
* releaser: Add release notes for 0.92.2 [ci skip] bf1fa713 bep
* Add HUGO_ENV to the os/exec environment 4f4cec73 jmooring 9490
* Simplify some integration tests da4866c2 bep
* Fix validation of Page Kind in cascade target map d1109f59 jmooring 8888
* Add another cascade benchmark a7d182ce bep
* commands: Fix server deadlock on config error a2a660ed bep 9486
* Exclude event attributes when rendering markdown f7bc4cc5 jmooring 9463
* Remove the "check" command 54f8d8a7 jmooring 9454
* Update the application/javascript media type 3036d0ac jmooring 9483
* tpl/templates: Fix templates.Exist issue with base templates 6a238a72 bep 9477
* Add a migration test helper f60714b5 bep
* babel: Port integration tests to their own package 215a715d bep
* js: Port integration tests to its own package d128d260 bep
* postcss: Move integration test to its own package c4aaf1d5 bep
* minifier: Port integration tests to its package 94f10cf4 bep
* templates: Port integration test to its package b06c2103 bep
* tocss: Port integration tests to their package d22f7795 bep
* openapi3: Port integration test into correct package 39f69ca7 bep
* Add a new integration test framework 64f75adc bep
* Validate comparison operator argument count 92627190 jmooring 9462
* Remove hugo gen autocomplete 33367629 jmooring 8862
* deps: Update github.com/pelletier/go-toml/v2 to v2.0.0-beta.6 5ca40c8f bep 9439 9417
* Fix erroneous warning with .Page.RenderString on a page without a backing file ef7d14a2 bep 9433
* Fix typo in panicOnWarning message c05c99f0 jmooring
* releaser: Prepare repository for 0.93.0-DEV ff7689ce bep
* releaser: Bump versions for release of 0.92.1 85e2e862 bep
* releaser: Add release notes for 0.92.1 [ci skip] 515f8a6d bep
* Make the RenderString content provider fix more general f22c4aba bep 9383
* Fix .RenderString issue in .Translations 85d31f7b ptgott 9383
* general: Fix issue causing log threads to hang indefinitely when print() panics 22055176 Ephex2 9380
* Fix duplicate mount sources 7a080b62 bep 9426
* tpl/collections: Fix apply with namespaced template funcs 26557399 bep 9393
* common: Remove unused code 348d300a bep
* common/paths: Remove unused code 6f07bdb1 bep
* helpers: Remove unused code 55a9bc1e bep
* Do not render hl_style as an HTML attribute 20a7ce7c jmooring 9390
* build(deps): bump github.com/spf13/viper from 1.8.1 to 1.10.1 8cd44924 dependabot[bot]
* Fixing typos (9387) 9d8f318a deining
* Fix typo in warning message fcbbbef2 deining
* github: Clean up the issue templates a little 6041adc1 bep
* github: Add lock-threads step 408da436 bep
* releaser: Prepare repository for 0.93.0-DEV ed04ed57 bep

0.92.2

This is a bug-fix release with a couple of important fixes.

* Add HUGO_ENV to the os/exec environment 4f4cec73 [jmooring](https://github.com/jmooring) #9490
* Simplify some integration tests da4866c2 [bep](https://github.com/bep)
* Fix validation of Page Kind in cascade target map d1109f59 [jmooring](https://github.com/jmooring) #8888
* Add another cascade benchmark a7d182ce [bep](https://github.com/bep)
* commands: Fix server deadlock on config error a2a660ed [bep](https://github.com/bep) #9486
* Exclude event attributes when rendering markdown f7bc4cc5 [jmooring](https://github.com/jmooring) #9463
* Remove the "check" command 54f8d8a7 [jmooring](https://github.com/jmooring) #9454
* Update the application/javascript media type 3036d0ac [jmooring](https://github.com/jmooring) #9483
* tpl/templates: Fix templates.Exist issue with base templates 6a238a72 [bep](https://github.com/bep) #9477
* Add a migration test helper f60714b5 [bep](https://github.com/bep)
* babel: Port integration tests to their own package 215a715d [bep](https://github.com/bep)
* js: Port integration tests to its own package d128d260 [bep](https://github.com/bep)
* postcss: Move integration test to its own package c4aaf1d5 [bep](https://github.com/bep)
* minifier: Port integration tests to its package 94f10cf4 [bep](https://github.com/bep)
* templates: Port integration test to its package b06c2103 [bep](https://github.com/bep)
* tocss: Port integration tests to their package d22f7795 [bep](https://github.com/bep)
* openapi3: Port integration test into correct package 39f69ca7 [bep](https://github.com/bep)
* Add a new integration test framework 64f75adc [bep](https://github.com/bep)
* Validate comparison operator argument count 92627190 [jmooring](https://github.com/jmooring) #9462
* Remove hugo gen autocomplete 33367629 [jmooring](https://github.com/jmooring) #8862
* deps: Update github.com/pelletier/go-toml/v2 to v2.0.0-beta.6 5ca40c8f [bep](https://github.com/bep) #9439 9417
* Fix erroneous warning with .Page.RenderString on a page without a backing file ef7d14a2 [bep](https://github.com/bep) #9433
* Fix typo in panicOnWarning message c05c99f0 [jmooring](https://github.com/jmooring)
* releaser: Prepare repository for 0.93.0-DEV ff7689ce [bep](https://github.com/bep)

0.92.1

This is a bug-fix release with a couple of important fixes.

* Make the RenderString content provider fix more general f22c4aba [bep](https://github.com/bep) #9383
* Fix .RenderString issue in .Translations 85d31f7b [ptgott](https://github.com/ptgott) #9383
* general: Fix issue causing log threads to hang indefinitely when print() panics 22055176 [Ephex2](https://github.com/Ephex2) #9380
* Fix duplicate mount sources 7a080b62 [bep](https://github.com/bep) #9426
* tpl/collections: Fix apply with namespaced template funcs 26557399 [bep](https://github.com/bep) #9393
* common: Remove unused code 348d300a [bep](https://github.com/bep)
* common/paths: Remove unused code 6f07bdb1 [bep](https://github.com/bep)
* helpers: Remove unused code 55a9bc1e [bep](https://github.com/bep)
* Do not render hl_style as an HTML attribute 20a7ce7c [jmooring](https://github.com/jmooring) #9390
* build(deps): bump github.com/spf13/viper from 1.8.1 to 1.10.1 8cd44924 [dependabot[bot]](https://github.com/apps/dependabot)
* Fixing typos (9387) 9d8f318a [deining](https://github.com/deining)
* Fix typo in warning message fcbbbef2 [deining](https://github.com/deining)
* github: Clean up the issue templates a little 6041adc1 [bep](https://github.com/bep)
* github: Add lock-threads step 408da436 [bep](https://github.com/bep)

0.92.0

* The `.Page` methods marked as deprecated in Hugo 0.55 are now removed. They have been logged as an `ERROR` for a long time now and you will still get a clear error if you use them.
* The support for `MMark` as a Markdown engine is removed. That has been marked as deprecated for a long time, and the upstream library is also deprecated and unmaintained.
* If you use `.Path` on a `Page` that is backed by a file, you will now get a warning. More on that below.

The `.Path` method on `Page` works like before. But that method currently has a little vague specification – it behaves a little different if backed by a file. In Hugo `0.93` we're going to introduce a _canonical content path_, and to prepare for that change, you may see this in your log:

bash
WARN 2022/01/12 10:23:37 .Path when the page is backed by a file is deprecated and will be removed in a future release. We plan to use Path for a canonical source path and you probably want to check the source is a file. To get the current behaviour, you can use a construct simlar to the below:

{{ $path := "" }}
{{ with .File }}
{{ $path = .Path }}
{{ else }}
{{ $path = .Path }}
{{ end }}


Re-run Hugo with the flag --panicOnWarning to get a better error message.


`.Path` is commonly used to create links to the source on GitHub – and that obviously only works for files, so you, as suggested above, may want to check if it's a file first.

Note that the `--panicOnWarning` flag is a new flag in this release and works for all warnings – it will fail fast on the first warning and point to the line in question. This makes it much easier to pin-point the location.

But this release isn't all about technical upgrades. We have also added a new `hugo.Deps` template function. We have already a way to list the Hugo Modules dependencies from the command line (`hugo mod graph`), but we thought it would be useful to also record this into your rendered site. An example of a "dependency table" in HTML may look like this:

htmlbars
<h2>Dependencies</h2>
<table class="table table-dark">
<thead>
<tr>
<th scope="col"></th>
<th scope="col">Owner</th>
<th scope="col">Path</th>
<th scope="col">Version</th>
<th scope="col">Time</th>
<th scope="col">Vendor</th>
</tr>
</thead>
<tbody>
{{ range $i, $e := hugo.Deps }}
<tr>
<th scope="row">{{ add $i 1 }}</th>
<td>{{ with .Owner }}{{.Path }}{{ end }}</td>
<td>
{{ .Path }}
{{ with .Replace}}
=> {{ .Path }}
{{ end }}
</td>
<td>{{ .Version }}</td>
<td>{{ with .Time }}{{ . }}{{ end }}</td>
<td>{{ .Vendor }}</td>
</tr>
{{ end }}
</tbody>
</table>

This release represents **41 contributions by 4 contributors** to the main Hugo code base.[bep](https://github.com/bep) leads the Hugo development with a significant amount of contributions, but also a big shoutout to [jmooring](https://github.com/jmooring), [ptgott](https://github.com/ptgott), and [roointan](https://github.com/roointan) for their ongoing contributions.
And thanks to [digitalcraftsman](https://github.com/digitalcraftsman) for his ongoing work on keeping the themes site in pristine condition.

Many have also been busy writing and fixing the documentation in [hugoDocs](https://github.com/gohugoio/hugoDocs),
which has received **9 contributions by 4 contributors**. A special thanks to [bep](https://github.com/bep), [jmooring](https://github.com/jmooring), [anarchivist](https://github.com/anarchivist), and [davidsneighbour](https://github.com/davidsneighbour) for their work on the documentation site.


Hugo now has:

* 56338+ [stars](https://github.com/gohugoio/hugo/stargazers)
* 431+ [contributors](https://github.com/gohugoio/hugo/graphs/contributors)
* 415+ [themes](http://themes.gohugo.io/)


Notes

* Make the deprecated Page/File methods (from Hugo 0.55) ERROR 56ab83a5 [bep](https://github.com/bep) #9346
* releaser: Add release notes for 0.91.2 [ci skip] f0b55a68 [bep](https://github.com/bep)
* releaser: Add release notes for 0.91.1 [ci skip] af165d5b [bep](https://github.com/bep)


Changes

* docs: Regenerate docshelper f2bc13dd [bep](https://github.com/bep)
* Only create LazyContentProvider for the non-rendering Site cdcd15b6 [bep](https://github.com/bep) #8919
* Fix missing page data for alternative formats 25d645f4 [ptgott](https://github.com/ptgott) #8919
* docs: Add dependency table to maintainance page fbb3c181 [bep](https://github.com/bep) #8949
* deps: Upgrade github.com/evanw/esbuild v0.14.8 => v0.14.11 9af4ca38 [bep](https://github.com/bep)
* Add hugo.Deps 7396aa94 [bep](https://github.com/bep) #8949
* hugolib: Fix livereload problem with files including NFC characters in MacOs d82cef5c [roointan](https://github.com/roointan) #8429
* docs. Regen CLI docs 74f0777c [bep](https://github.com/bep) #9363
* commands: Fix CLI help text for hugo new e334a406 [bep](https://github.com/bep) #9363
* Update to Go 1.17.6 5bd3c8df [bep](https://github.com/bep) #9361
* create: Correctly pass newContentEditor flags 0aca99fe [jmooring](https://github.com/jmooring) #9356
* Add --panicOnWarning flag c8b5ab75 [bep](https://github.com/bep) #9357 9359
* github: Increase stale days 85c5b895 [bep](https://github.com/bep)
* docs: Regenerate CLI docs 96576083 [bep](https://github.com/bep)
* docs: Regenerate docshelper 4a0b5533 [bep](https://github.com/bep)
* Remove mmark 1651beb2 [bep](https://github.com/bep) #9350
* Misc depreation updates 2b6063c3 [bep](https://github.com/bep) #9348 9349
* Make the deprecated Page/File methods (from Hugo 0.55) ERROR 56ab83a5 [bep](https://github.com/bep) #9346
* github: Add add stale GitHub action dad0dc8d [bep](https://github.com/bep)
* Fix surprise OutputFormat.Rel overwriting d3c4fdb8 [ptgott](https://github.com/ptgott) #8030
* hugolib: Make an RST test optional d632dd7d [bep](https://github.com/bep)
* deps: Upgrade github.com/niklasfasching/go-org v1.5.0 => v1.6.0 0671ef55 [jmooring](https://github.com/jmooring) #8921
* Update stale.yml 672481f1 [bep](https://github.com/bep)
* releaser: Prepare repository for 0.92.0-DEV 1dbfc0f9 [bep](https://github.com/bep)
* releaser: Bump versions for release of 0.91.2 1798bd3f [bep](https://github.com/bep)
* releaser: Add release notes for 0.91.2 [ci skip] f0b55a68 [bep](https://github.com/bep)
* Revert "config/security: Add HOME to default exec env var whitelist" 623dda71 [bep](https://github.com/bep)
* Make sure we always create the /public folder aee9e11a [bep](https://github.com/bep) #8166
* Fix "stuck on build" in error situations in content processing bd63c1aa [bep](https://github.com/bep) #8166
* deps: Run "go mod tidy" 9eb05807 [bep](https://github.com/bep)
* deps: Upgrade github.com/evanw/esbuild v0.14.7 => v0.14.8 654f513a [bep](https://github.com/bep)
* releaser: Prepare repository for 0.92.0-DEV 759cdf3f [bep](https://github.com/bep)
* releaser: Bump versions for release of 0.91.1 f4235057 [bep](https://github.com/bep)
* releaser: Add release notes for 0.91.1 [ci skip] af165d5b [bep](https://github.com/bep)
* media: Also consider extension in FromContent 6779117f [bep](https://github.com/bep)
* media: Add missing BMP and GIF to the default MediaTypes list ce040110 [bep](https://github.com/bep)
* media: Add PDF MIME type cdc73526 [bep](https://github.com/bep)
* deps: Update github.com/evanw/esbuild v0.14.5 => v0.14.7 425c7d90 [bep](https://github.com/bep)
* config/security: Add HOME to default exec env var whitelist fca266eb [bep](https://github.com/bep) #9309
* modules: Set GOCACHE env var 0016e21c [bep](https://github.com/bep) #9309
* releaser: Prepare repository for 0.92.0-DEV 728feaec [bep](https://github.com/bep)

0.91.2

This is a bug-fix release with a couple of important fixes.

* Revert "config/security: Add HOME to default exec env var whitelist" 623dda71 [bep](https://github.com/bep)
* Make sure we always create the /public folder aee9e11a [bep](https://github.com/bep) #8166
* Fix "stuck on build" in error situations in content processing bd63c1aa [bep](https://github.com/bep) #8166
* deps: Run "go mod tidy" 9eb05807 [bep](https://github.com/bep)
* deps: Upgrade github.com/evanw/esbuild v0.14.7 => v0.14.8 654f513a [bep](https://github.com/bep)

0.91.1

This is a bug-fix release with a couple of important fixes.

* media: Also consider extension in FromContent 6779117f [bep](https://github.com/bep)
* media: Add missing BMP and GIF to the default MediaTypes list ce040110 [bep](https://github.com/bep)
* media: Add PDF MIME type cdc73526 [bep](https://github.com/bep)
* deps: Update github.com/evanw/esbuild v0.14.5 => v0.14.7 425c7d90 [bep](https://github.com/bep)
* config/security: Add HOME to default exec env var whitelist fca266eb [bep](https://github.com/bep) #9309
* modules: Set GOCACHE env var 0016e21c [bep](https://github.com/bep) #9309

Page 17 of 47

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.