Cascade.yaml in configuration directory

The following is in hugo.yaml

cascade:
  - _target:
      kind: page
      path: /pets/cats/**
    layout: cats
    tags:
      - cute

Which works fine and it’s a great feature (one place to rule them all). I then decide to put it into cascade.yaml as a root configuration file which I understand should then look like this:

  - _target:
      kind: page
      path: /pets/cats/**
    layout: cats
    tags:
      - cute

This gives me the following build error:

"_stream.yaml:1:1": failed to unmarshal YAML: yaml: unmarshal errors:   line 1: cannot unmarshal !!seq into map[string]interface {}

Working in the following env:

hugo v0.134.3-5fb333b9f5ff4ec018f9d78910177d0bec1befb0+extended windows/amd64 BuildDate=2024-09-19T14:28:20Z VendorInfo=gohugoio
GOOS="windows"
GOARCH="amd64"
GOVERSION="go1.23.0"
github.com/sass/libsass="3.6.6"
github.com/webmproject/libwebp="v1.3.2"

Any advice to what I’m doing wrong is much appreciated.

I don’t think it’s currently possible. I’m guessing all (or most) of our other config sections are maps, and I didn’t think about this when I added the cascade config section, see

Thank you for confirming this. Much appreciated. It is still a great feature being able to cascade from config since I work on multilingual sites. I will keep watch if moving it to cascade config file is possible in the future.

1 Like

I can add that it still is possible to pub cascade inside e.g. /config/development/hugo.toml etc., which would allow you to have cascade per environment, it’s just not possible to split it into cascade.toml.