Combining two configuration files

With the following configuration files structure, where root configuration is part of module A and /docs configuration is part of module B:

├── docs
│   ├── content
│   │   └──
│   ├── go.mod
│   ├── go.sum
│   └── hugo.yaml
├── go.mod
└── hugo.yaml

The only way I managed to combine the configurations is with --config ../hugo.yaml,./hugo.yaml. Is there a better way to do this, in order to avoid adding the extra setting into command line?

I looked at but it does not work as intended. Example of /docs/

go 1.22.2

use .
use ../