v0.147.0

gohugoio/hugov0.147.0Apr 25, 2025by bep

AI Summary

A significant feature release introducing vertical text alignment and major improvements to configuration merging for modules and themes.

Key Highlights

  • Add 'aligny' option for vertical alignment in images.Text
  • Improve configuration merging with '_merge = deep' strategy
  • Fix internal codeblock rendering preference
  • Fix allowFullScreen option in Vimeo and YouTube shortcodes

New Features

  • Vertical alignment option for images.Text
  • Deep merge configuration settings

Full Release Notes

This release comes with a new `aligny` option (shoutout to @pranshugaba  for the implementation) for [images.Text](https://gohugo.io/functions/images/text/) that, in combination with `alignx` makes it simple to e.g. center the text on top of image in both axis. But the main reason this release comes now and not later, is the improvements/fixes to the order Hugo applies the default configuration to some keys. This is inherited from how we did this before we rewrote the configuration handling, and it made the merging of configuration from modules/themes into the config root harder and less flexible than it had to be. Me, @bep, looking into this, was triggered by [this](https://discourse.gohugo.io/t/how-to-manage-common-config-in-hugo-using-modules/54485/4) forum topic. Having many sites share a common configuration is very useful. With this release, you can simply get what the thread starter asks for by doing something à la:

```toml
baseURL = "http://example.org"
title = "My Hugo Site"

# ... import any themes/modules.

# This will merge in all config imported from imported modules. 
_merge = "deep"
```

See the [documentation](https://gohugo.io/configuration/introduction/#merge-configuration-settings) for details.

## Bug fixes

* tpl: Fix it so we always prefer internal codeblock rendering over render-codeblock-foo.html and similar 07983e04e @bep #13651 
* tpl/tplimpl: Fix allowFullScreen option in Vimeo and YouTube shortcodes 5c491409d @jmooring #13650 
* config: Fix _merge issue when key doesn't exist on the left side 179aea11a @bep #13643 #13646 
* all: Fix typos 6a0e04241 @coliff 

## Improvements

* create/skeletons: Adjust template names in theme skeleton 75b219db8 @jmooring 
* tpl: Remove some unreached code branches ad4f63c92 @bep 
* images: Add some test cases for aligny on images.Text 53202314a @bep #13414 
* images: Add option for vertical alignment to images.Text 2fce0bac0 @pranshugaba 

## Dependency Updates

* build(deps): bump github.com/evanw/esbuild from 0.25.2 to 0.25.3 1bd7ac7ed @dependabot[bot] 
* build(deps): bump github.com/alecthomas/chroma/v2 from 2.16.0 to 2.17.0 41cb880f9 @dependabot[bot]