Hugo

Latest version: v0.145.0

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

Scan your dependencies

Page 1 of 54

1.19

use .
use ../gohugoioTheme


Using the `use` directive, list all the modules you want to work on, pointing to its relative location. As in the example above, it's recommended to always include the main project (the ".") in the list.

With that you can start the Hugo server with that workspace enabled:


HUGO_MODULE_WORKSPACE=hugo.work hugo server --ignoreVendorPaths "**"


The `--ignoreVendorPaths` flag is added above to ignore any of the vendored dependencies inside `_vendor`. If you don't use vendoring, you don't need that flag. But now the server is set up watching the files and directories in the workspace and you can see your local edits reloaded.

Breadcrumbs

We have added a new `.Ancestors` method on `Page` that walks up the tree to the home page. With this, breadcrumbs templates can be greatly simplified:

handlebars
<ol>
<ul>
{{- range .Ancestors.Reverse }}
<li><a href="{{ .Permalink }}">{{ .Title }}</a></li>
{{- end }}
<li class="active" aria-current="page">
<a href="{{ .Permalink }}">{{ .Title }}</a>
</li>
</ul>
</ol>


The path to /public now available in PostCSS

So you can do `process.env.HUGO_PUBLISHDIR` in your `postcss.config.js` to figure out where Hugo publishes
its files.

Note that the value will always be an absolute file path and will point to a directory on disk even when running `hugo server` in memory mode.

If you write to this folder from PostCSS when running the server, you could run the server with one of these flags:


hugo server --renderToDisk
hugo server --renderStaticToDisk


Note

* modules: Make the module.workspace=off as default (note) 0d4b17d4 bep 10553
* release: Add a note section in release notes 3afaca75 bep
* helpers: Allow at signs in UnicodeSanitize (note) 2d217cba jmooring 10548
* Also consider wrapped errors when checking for file IsNotExist errors ad205987 bep 10534

Bug fixes

* If you use the legacy `libsass` transpiler in `toCSS` and uses the cached build to avoid having the extended version installed on the CI server, you need to rebuild those assets and commit them to source control (e.g. with `hugo --gc`).
* tpl/resources: Fix data race in ToCSS aa2c7241 bep 10542
* tocss: Fix unquote case with double quotes 5d5f0a23 septs 10555
* resources/js: Fix some import discrepancies between Hugo and ESBuild b54de1bd bep 10527
* parser/metadecoders: Fix spelling e0e63f35 lacamera

Improvements

* Adjust "you need the extended version" error message 180dfeba bep
* resource/page: Slight adjustment of Page.Ancestors eb0c8f9d bep 10567
* resource/page: Add Page.Ancestors 3a216186 septs 10567
* Annotate test assertions 71832328 jmooring
* hugolib: Exclude non-linkable pages from translations map 37ab1cf1 jmooring 9073
* Add HUGO_PUBLISHDIR to the Node environment 59af05ca bep 10554
* Revert "tpl/tplimpl: Use https in sitemap templates" 4989da65 jmooring
* tocss: Add some more test cases effa6a42 bep 10555
* Allow "fast render mode" even if --disableLiveReload is set d20d2651 bep 10561
* tocss: Add vars option 41a080b2 bep 10555
* modules: Improve "module workspace" not found error eda1e720 bep
* modules: Adjust watch logic vs workspace use definitions 330fa894 bep
* Add any configured Go Workspace file to the config watcher 6db52748 bep 10556
* parser/metadecoders: Remove superflous cast in test 17055d1f bep
* parser/metadecoders: Simplify nil check in Unmarshal 2a81a494 bep
* parser/metadecoders: Add empty /data JSON file as empty map e30d711c acclassic 8601
* tpl/openapi3: Wrap *kopenapi3.T 87e898a1 bep
* github: Use ruby/setup-ruby d8942698 bep 10517
* tpl/tplimpl: Use https in sitemap templates 3fd0b784 jmooring 10515

Dependency Updates

* build(deps): bump golang.org/x/tools from 0.3.0 to 0.4.0 7874b968 dependabot[bot]

Documentation

* docs: Regen docs helper JSON 10bb29d7 bep
* tpl: Improve template funcs GoDoc cd1ed563 bep

Build Setup

* github: Update to Dart Sass 1.56.2 c9354d54 bep

[^1]: We're working on some bigger and even more exiting Hugo features that will be ready early next year. Stay tuned!

0.145.0

The notable new feature is the new [transform.PortableText](https://gohugo.io/functions/transform/portabletext/) function that makes it possible to use the Sanity CMS with Hugo.

Bug fixes

* all: Typo fixes 4094a1e12 coliff
* all: Run modernize -fix ./... 521911a57 bep
* readme: Fix relative links in Editions section ab9e54576 martey
* Fix some related content issues with content adapters 381c0da85 bep 13443
* Fix potential nilpointer in httpcache config 227e42926 bep
* Fix --printPathWarnings when site calls templates.Defer c3d435acf bep 13420

Improvements

* Use the page path and not the backing filename as the last resort in the default sort c498d0fe1 bep
* tpl: HTTPS the instagram Shortcode JS 2f4e666d7 coliff
* Add transform.PortableText 04f21b4d8 bep
* hugolib: Deprecate _build front matter key in favor of build d0ce94219 jmooring

Dependency Updates

* deps: Upgrade github.com/rogpeppe/go-internal v1.13.1 => v1.14.1 6927e6f04 bep 13449
* build(deps): bump github.com/yuin/goldmark-emoji from 1.0.4 to 1.0.5 b7ae24b9c dependabot[bot]
* build(deps): bump github.com/google/go-cmp from 0.6.0 to 0.7.0 1a4851f13 dependabot[bot]
* build(deps): bump github.com/tetratelabs/wazero from 1.8.2 to 1.9.0 d1f23309b dependabot[bot]

Documentation

* github: Build docker image with both extended and withdeploy tags e5eecbd9b margau

Build Setup

* snap: Update Node.js to 22.x 4fd7f3233 jmooring

0.144.2

What's Changed

* Fix --printPathWarnings when site calls templates.Defer c3d435acf bep 13420

0.144.1

What's Changed

* markup/goldmark: Fix panic on empty Markdown header 494e88abf bep 13416

0.144.0

Go 1.24 upgrade, several performance improvements, new [:contentbasename](https://gohugo.io/content-management/urls/#contentbasename) and [:slugorcontentbasename](https://gohugo.io/content-management/urls/#slugorcontentbasename) permalink tokens, enable KaTeX `mhchem` extension for [transform.ToMath](https://gohugo.io/functions/transform/tomath/), full dependency refresh, new `drop` option for [js.Build](https://gohugo.io/functions/js/build/#drop), new [auth](https://gohugo.io/hugo-modules/configuration/#auth) module option useful for private module repositories, [autoID](https://gohugo.io/getting-started/configuration-markup/#parserautodefinitiontermid) support for [definition terms](https://michelf.ca/projects/php-markdown/extra/#def-list), new `configurationTypes` configuration option, and more. For more details, see [this topic](https://discourse.gohugo.io/t/more-about-the-v0-144-0-release/53584).

Note

* Fix auto generated header ids so they don't contain e.g. hyperlink destinations (note) 24cc25552 bep 13405 13410

Bug fixes

* markup/goldmark: Fix panic on stray attribute nodes 85c172774 bep
* Fix Position for passthrough hooks 641403f7d bep 13406
* config: Fix server.redirects.fromRe being ignored unless server.redirects.from is also set c1f4228d6 p-weston
* Fix shortcode name in error message on self-closing shortcodes with no .Inner e865d5984 bep 13344

Improvements

* config/allconfig: Deprecate :filename and :slugorfilename tokens 5de3913ed jmooring
* resources/page: Revise the new contentbasename permalinks tokens 7b7a0f362 bep 11722
* resources/page: Add :contentbasename and :contentbasenameorslug permalink tokens cb7a4339b hacdias 11722
* Add autoID for definition terms 157d3703c bep 13403 11566
* internal/warpc: Enable KaTeX mhchem extension 503dcf625 jmooring
* modules: Add GOAUTH to module config 2c77719cd bep 13385
* Support menus as maps in content adapters fd38aee69 bep 13384
* js/esbuild: Add drop option d25f7ec17 bep 13362
* config: Remove unused code 34dcac53b jmooring
* commands: Use punctuation consistently in short description ee438606d jmooring
* Upgrade to Go 1.24 fd8b0fbf8 bep 13381
* Deprecate kind, lang, and path from front matter 9b5f786df bep 12484
* commands: Move the CHMOD event filter up e6feb9e0b bep 13373
* parser: Handle org-mode filetags as slice f02da7fbc theSuess
* Add ContentTypes to config c2fb22120 bep 12274
* commands: Validate style argument passed to gen chromastyles a352e69b0 jmooring 13357
* Update CONTRIBUTING.md 1dd27be81 bep
* Move "print unused templates" after renderDeferred eb7a5aaba bep 13355
* Add some more server options/improvements 029d1e0ce bep

Dependency Updates

* build(deps): bump github.com/spf13/cobra from 1.8.1 to 1.9.1 a2ca95629 dependabot[bot]
* build(deps): bump github.com/sanity-io/litter from 1.5.7 to 1.5.8 367fe526e dependabot[bot]
* build(deps): bump github.com/sanity-io/litter from 1.5.5 to 1.5.7 9c2f8ec61 dependabot[bot]
* build(deps): bump github.com/gohugoio/hugo-goldmark-extensions/extras bd77944ba dependabot[bot]
* build(deps): bump golang.org/x/tools from 0.29.0 to 0.30.0 2e835d084 dependabot[bot]
* build(deps): bump github.com/aws/aws-sdk-go-v2/service/cloudfront d89b9d891 dependabot[bot]
* build(deps): bump google.golang.org/api from 0.206.0 to 0.221.0 8721a3520 dependabot[bot]
* build(deps): bump github.com/bep/imagemeta from 0.8.3 to 0.8.4 c054e1882 dependabot[bot]
* build(deps): bump golang.org/x/image from 0.22.0 to 0.24.0 5e4ffa0e8 dependabot[bot]
* build(deps): bump golang.org/x/mod from 0.22.0 to 0.23.0 0cdcc2b58 dependabot[bot]
* build(deps): bump github.com/gohugoio/hashstructure from 0.3.0 to 0.5.0 a591c4406 dependabot[bot]
* build(deps): bump github.com/bep/simplecobra from 0.4.0 to 0.5.0 2d86a0512 dependabot[bot]
* build(deps): bump github.com/aws/aws-sdk-go-v2/service/cloudfront 22ee0918f dependabot[bot]
* build(deps): bump github.com/aws/aws-sdk-go-v2 from 1.32.4 to 1.36.1 b50ab0403 dependabot[bot]
* build(deps): bump github.com/getkin/kin-openapi from 0.123.0 to 0.129.0 b772f0e3d dependabot[bot]
* build(deps): bump github.com/spf13/pflag from 1.0.5 to 1.0.6 d58c0198d dependabot[bot]

Documentation

* Update README.md 5dd0ba00f jmooring
* helpers: Add Chroma styles to docs.yaml f0c185297 jmooring 13360

0.143.1

What's Changed

* Fix RSS with baseURL with sub dir when render hooks is enabled 760c13a7a bep 13332
* mage: Simplify magefile 3bd73d262 alexandear
* common/hugo: Adjust deprecation timing and message 7104de83c jmooring 13333
* Re-introduce the LRU-evicted identities in change set calculation 835579b33 bep

Page 1 of 54

Links

Releases

Has known vulnerabilities

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.