decaporg / decaporg/decap-cms

Add submodule support

Open
#4,056 3 comments 0 reactions 0 assignees View on GitHub
area: extensions/backends type: feature
Dominant language
JavaScript
Stars
19.4k
Forks
3.1k
Avg merge
1d 14h
Merged PRs (30d)
9

Description

**Is your feature request related to a problem? Please describe.**

I want to run two different blogs with the same content. To accomplish this I decided to store the `/content` folder as a different repo and then add it via `git add submodule` to the respective repos of both the blogs.

When I built the blogs (on Netlify) using Hugo, there were no issues. However, when I logged in to Netlify CMS, none of the posts was displayed. When I tried to create a post, I got the following error: `Failed to persist entry: API_ERROR: GitRPC::BadObjectState`.

I expected Netlify CMS to read the content from the submodule and allow additions/modifications to it.

**Describe the solution you'd like**

Netlify CMS should be able to **detect and write content to an existing submodule**.

**Describe alternatives you've considered**

I couldn't think of any other alternative except for cloning the content folder of one blog to the other whenever I make an update. However, an author who doesn't have repo access won't be able to do so.

**Additional context**

The repo where I was trying to implement this can be found here: https://github.com/ragasirtahk/backend
Just in case I made some mistake and Netlify CMS already supports this ¯\_(ツ)_/¯

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.