decaporg / decap-cms

A Git-based CMS for Static Site Generators
https://decapcms.org
MIT License
17.84k stars 3.04k forks source link

Support a backend for standard git servers #1791

Open heistp opened 6 years ago

heistp commented 6 years ago

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

I like the Netlify CMS UI for editing content, but afaik the only option for self-hosted repos is to set up local instances of either GitLab or Bitbucket, both of which are rather heavy weight for low-end hardware.

Describe the solution you'd like

I'd like to see a straight git backend that stores content on a standard git server. I can think of two ways to implement this:

Have a missed some way to do this already, or am I over-simplifying this request in some way? :)

Describe alternatives you've considered

Additional context

bignell commented 5 years ago

I know this is 9 months later, but I'm also curious about this—it seems to me, if the purpose of netlify-cms is to provide a browser UI for git-based content, the most straightforward way to make it platform-agnostic would be to use git directly, rather than individual platform plugins.

Is it a case of the browser-based git implementations being significantly more complicated than the various platform APIs?

erquhart commented 5 years ago

I never took the time to really read into isomorphic git until now - its super impressive. There's nothing stopping someone from creating a Git backend using that - check out the existing backends to get a feel for how a backend works and what API a backend needs to provide for Netlify CMS.

Here's the source for netlify-cms-backend-github as an example: https://github.com/netlify/netlify-cms/tree/master/packages/netlify-cms-backend-github

nihakue commented 5 years ago

Isomorphic git currently only supports fast forward merges, would that be an issue? I'm interested in taking this work on, but it would be super useful to have guidance from a more experienced contributor.

For example, is the backend abstraction leaky?would you only need to implement a backend package for isomorphic git adhering to the existing interface, or are there other places in the code that you would need to understand?

erquhart commented 5 years ago

If you check the implementation.js module of any of the existing backends (except git gateway), you'll see the methods that Netlify CMS calls on from a backend. How those methods do what they do is entirely up to the backend author.

The backend API is also complete, no area of Netlify CMS is reaching illegally in to do privileged things. That said, without tests to prove it, a leak is possible, but I'm not aware of any.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.