decaporg / decaporg/decap-cms

Netlify CMS in a monorepo still commits relative to root directory

Open
#6,302 5 comments 0 reactions 0 assignees View on GitHub
type: bug
Dominant language
JavaScript
Stars
19.4k
Forks
3.1k
Avg merge
1d 14h
Merged PRs (30d)
9

Description

We have a project that stores the netlify cms codebase in `web/` and the netlify cms configs are in `web/_content` when we view the admin from the site it works just fine because it's loading it relative to `netlify.toml`'s `base` config (which is `web`). When you commit it stores the updated files in `/_content` instead of `web/_content`.

- We can't store the _content outside of the base directory for obvious scope/access reasons. Errors like `Failed to load entry: API_ERROR: "params.folder" must resolve to a path under the configured repository` show up.
- We can't use `file: "web/_content"` in our CMS config because it looks for it in `web/web/_content`

## Solution

To add a config parameter for netlify cms admin to use as a "base" directory (similar to netlify's `base` config in `netlify.toml`)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.