hugomods / decap-cms

[Experimental] Hugo Decap CMS Module
https://hugomods.com
MIT License
6 stars 1 forks source link

Decap fails to find configuration in hugo.toml #151

Closed adrinux closed 7 months ago

adrinux commented 7 months ago

I have set up the module as described on hugo-mods, enabled the local_backend and started both hugo and decap-server. (I run hugo server on port 1313.)

When I visit localhost:1313/admin/ the decap cms appears but errors, complaining that config.yml is missing.

Error loading the CMS configuration
Config Errors:
Error: Failed to load config.yml (404)
Check your config.yml file.

Which of course it is, the config is in hugo.toml instead. If I add a config.yml to decaps usual content/admin location then the decap loads ok.

Any suggestion on why the config isn't passed from hugo.toml to decap? Does my hugo config - at least the decap related part - need to be in yaml because that's what decap expects?

Current hugo config is arranged thus:

config
├── _default
│   ├── hugo.toml
│   └── params.toml
├── development
│   └── hugo.toml
├── production
│   └── hugo.toml
└── staging
    └── hugo.toml
razonyang commented 7 months ago

I guess you forgot to append DecapCMSConfig into the home output.

adrinux commented 7 months ago

I didn't forget...but I did put an extra pair of square brackets around outputs -- facepalm.

[[outputs]]
home = ["HTML", "RSS", "DecapCMSConfig"]

Works with [outputs] as it should. Errors in the config for now but that I can work on.

Thanks for the pointer. Apologies for the noise.