decap-cms icon indicating copy to clipboard operation
decap-cms copied to clipboard

Specifying a default publish_mode value

Open privatemaker opened this issue 2 years ago • 0 comments

Following and testing the Gitea support discussed in #6984, #6997 it seems now that Decap works on Gitea and the Forgejo fork when the server is configured correctly, which is very cool 🥳

However, while testing a couple sites, I noticed the following error when using the nifty Hugo Module hugomods/decap-cms made by @razonyang

Screenshot 2024-02-07 at 18-26-15 Editor

Upon inspecting the config.yml file the module generates, which is served as decap-cms-confg.yml it seems the module is injecting publish_mode: editorial_workflow even when it's not specified. However, since with gitea this is incompatible, I tried changing value to Boolean false which shows:

'publish_mode' must be string
'publish_mode' must be equal to one of the allowed values

Also when setting it as String values "false" or "default" or "normal" it still fails with this error:

'publish_mode' must be equal to one of the allowed values

@razonyang modified his module to accept publish_mode: '' to omit the key being injected which solves this, for now. But I think Decap should also have a default value for this field.

Originally discussed in https://github.com/decaporg/decap-cms/discussions/7095

privatemaker avatar Feb 14 '24 14:02 privatemaker