Site compiled fine at v135.0 but fails on v136.3

After upgrading from Hugo v135.0 to v136.3, my site fails to render. Usually when this sort of thing happens I can work with the error messages but this time i am quite stumped.

Source code is at https://github.com/homerhanumat/tridentmoon.

MacOS 15.0.1.

hugo server and results:

``
% hugo server

Watching for changes in /Users/homer/git/tridentmoon/{archetypes,content,layouts,static,themes}
Watching for config changes in /Users/homer/git/tridentmoon/hugo.toml, /Users/homer/git/tridentmoon/themes/ananke/config.yaml
Start building sites …
hugo v0.136.3+extended darwin/arm64 BuildDate=2024-10-21T13:31:54Z VendorInfo=brew

ERROR render of “section” failed: “/Users/homer/git/tridentmoon/layouts/_default/baseof.html:29:7”: execute of template failed: template: _default/list.html:29:7: executing “_default/list.html” at <partial “site-style.html” .>: error calling partial: “/Users/homer/git/tridentmoon/themes/ananke/layouts/partials/site-style.html:1:8”: execute of template failed: template: partials/site-style.html:1:8: executing “partials/site-style.html” at <partialCached “func/style/GetMainCSS” “style/GetMainCSS”>: error calling partialCached: “/Users/homer/git/tridentmoon/themes/ananke/layouts/partials/func/style/GetMainCSS.html:25:8”: execute of template failed: template: partials/func/style/GetMainCSS.html:25:8: executing “partials/func/style/GetMainCSS.html” at <partialCached “func/socials/Get” “socials/Get”>: error calling partialCached: “/Users/homer/git/tridentmoon/themes/ananke/layouts/partials/func/socials/Get.html:30:12”: execute of template failed: template: partials/func/socials/Get.html:30:12: executing “partials/func/socials/Get.html” at <partialCached “func/socials/GetServiceData” .name .name>: error calling partialCached: “/Users/homer/git/tridentmoon/themes/ananke/layouts/partials/func/socials/GetServiceData.html:19:8”: execute of template failed: template: partials/func/socials/GetServiceData.html:19:8: executing “partials/func/socials/GetServiceData.html” at <partialCached “func/socials/GetBuiltInServicesDefaults” “socials/GetBuiltInServicesDefaults”>: error calling partialCached: “/Users/homer/git/tridentmoon/themes/ananke/layouts/partials/func/socials/GetBuiltInServicesDefaults.html:73:15”: execute of template failed: template: partials/func/socials/GetBuiltInServicesDefaults.html:73:15: executing “partials/func/socials/GetBuiltInServicesDefaults.html” at <transform.Unmarshal>: error calling Unmarshal: “_stream.yaml:4:1”: failed to unmarshal YAML: yaml: line 4: did not find expected key
ERROR render of “404” failed: “/Users/homer/git/tridentmoon/layouts/_default/baseof.html:29:7”: execute of template failed: template: 404.html:29:7: executing “404.html” at <partial “site-style.html” .>: error calling partial: “/Users/homer/git/tridentmoon/themes/ananke/layouts/partials/site-style.html:1:8”: execute of template failed: template: partials/site-style.html:1:8: executing “partials/site-style.html” at <partialCached “func/style/GetMainCSS” “style/GetMainCSS”>: error calling partialCached: “/Users/homer/git/tridentmoon/themes/ananke/layouts/partials/func/style/GetMainCSS.html:25:8”: execute of template failed: template: partials/func/style/GetMainCSS.html:25:8: executing “partials/func/style/GetMainCSS.html” at <partialCached “func/socials/Get” “socials/Get”>: error calling partialCached: “/Users/homer/git/tridentmoon/themes/ananke/layouts/partials/func/socials/Get.html:30:12”: execute of template failed: template: partials/func/socials/Get.html:30:12: executing “partials/func/socials/Get.html” at <partialCached “func/socials/GetServiceData” .name .name>: error calling partialCached: “/Users/homer/git/tridentmoon/themes/ananke/layouts/partials/func/socials/GetServiceData.html:19:8”: execute of template failed: template: partials/func/socials/GetServiceData.html:19:8: executing “partials/func/socials/GetServiceData.html” at <partialCached “func/socials/GetBuiltInServicesDefaults” “socials/GetBuiltInServicesDefaults”>: error calling partialCached: “/Users/homer/git/tridentmoon/themes/ananke/layouts/partials/func/socials/GetBuiltInServicesDefaults.html:73:15”: execute of template failed: template: partials/func/socials/GetBuiltInServicesDefaults.html:73:15: executing “partials/func/socials/GetBuiltInServicesDefaults.html” at <transform.Unmarshal>: error calling Unmarshal: “_stream.yaml:4:1”: failed to unmarshal YAML: yaml: line 4: did not find expected key
ERROR render of “page” failed: “/Users/homer/git/tridentmoon/layouts/_default/baseof.html:29:7”: execute of template failed: template: page/single.html:29:7: executing “page/single.html” at <partial “site-style.html” .>: error calling partial: “/Users/homer/git/tridentmoon/themes/ananke/layouts/partials/site-style.html:1:8”: execute of template failed: template: partials/site-style.html:1:8: executing “partials/site-style.html” at <partialCached “func/style/GetMainCSS” “style/GetMainCSS”>: error calling partialCached: “/Users/homer/git/tridentmoon/themes/ananke/layouts/partials/func/style/GetMainCSS.html:25:8”: execute of template failed: template: partials/func/style/GetMainCSS.html:25:8: executing “partials/func/style/GetMainCSS.html” at <partialCached “func/socials/Get” “socials/Get”>: error calling partialCached: “/Users/homer/git/tridentmoon/themes/ananke/layouts/partials/func/socials/Get.html:30:12”: execute of template failed: template: partials/func/socials/Get.html:30:12: executing “partials/func/socials/Get.html” at <partialCached “func/socials/GetServiceData” .name .name>: error calling partialCached: “/Users/homer/git/tridentmoon/themes/ananke/layouts/partials/func/socials/GetServiceData.html:19:8”: execute of template failed: template: partials/func/socials/GetServiceData.html:19:8: executing “partials/func/socials/GetServiceData.html” at <partialCached “func/socials/GetBuiltInServicesDefaults” “socials/GetBuiltInServicesDefaults”>: error calling partialCached: “/Users/homer/git/tridentmoon/themes/ananke/layouts/partials/func/socials/GetBuiltInServicesDefaults.html:73:15”: execute of template failed: template: partials/func/socials/GetBuiltInServicesDefaults.html:73:15: executing “partials/func/socials/GetBuiltInServicesDefaults.html” at <transform.Unmarshal>: error calling Unmarshal: “_stream.yaml:4:1”: failed to unmarshal YAML: yaml: line 4: did not find expected key
Built in 97 ms
Error: error building site: render: failed to render pages: render of “home” failed: “/Users/homer/git/tridentmoon/layouts/_default/baseof.html:29:7”: execute of template failed: template: index.html:29:7: executing “index.html” at <partial “site-style.html” .>: error calling partial: “/Users/homer/git/tridentmoon/themes/ananke/layouts/partials/site-style.html:1:8”: execute of template failed: template: partials/site-style.html:1:8: executing “partials/site-style.html” at <partialCached “func/style/GetMainCSS” “style/GetMainCSS”>: error calling partialCached: “/Users/homer/git/tridentmoon/themes/ananke/layouts/partials/func/style/GetMainCSS.html:25:8”: execute of template failed: template: partials/func/style/GetMainCSS.html:25:8: executing “partials/func/style/GetMainCSS.html” at <partialCached “func/socials/Get” “socials/Get”>: error calling partialCached: “/Users/homer/git/tridentmoon/themes/ananke/layouts/partials/func/socials/Get.html:30:12”: execute of template failed: template: partials/func/socials/Get.html:30:12: executing “partials/func/socials/Get.html” at <partialCached “func/socials/GetServiceData” .name .name>: error calling partialCached: “/Users/homer/git/tridentmoon/themes/ananke/layouts/partials/func/socials/GetServiceData.html:19:8”: execute of template failed: template: partials/func/socials/GetServiceData.html:19:8: executing “partials/func/socials/GetServiceData.html” at <partialCached “func/socials/GetBuiltInServicesDefaults” “socials/GetBuiltInServicesDefaults”>: error calling partialCached: “/Users/homer/git/tridentmoon/themes/ananke/layouts/partials/func/socials/GetBuiltInServicesDefaults.html:73:15”: execute of template failed: template: partials/func/socials/GetBuiltInServicesDefaults.html:73:15: executing “partials/func/socials/GetBuiltInServicesDefaults.html” at <transform.Unmarshal>: error calling Unmarshal: “_stream.yaml:4:1”: failed to unmarshal YAML: yaml: line 4: did not find expected key`

This change in Hugo v0.136.3 removes whitespace before the first line of the YAML in this file:

themes/ananke/layouts/partials/func/socials/GetBuiltInServicesDefaults.html

Removing the whitespace produces invalid YAML.

Your options:

  1. Upgrade to the current commit of the Ananke theme. All of the social media features have been reworked, with updated documentation here. The file in question no longer exists.

  2. Override the GetBuiltInServicesDefaults.html partial by placing a copy of it, with the same relative path, inside of the layouts directory in the root of your project. Then deindent lines 28-72 by two spaces.

  3. Wait for us to revert the recent change to Hugo. I’ll log an issue, but it may be rejected as an acceptable breaking change… not sure yet.

Thanks. I followed option 1 (and started accessing Ananke as a go module).

The underlying problem (inadvertent whitespace removal) was fixed in v0.136.4.