Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git-based content management? [closed]

I'm looking for a Ruby CMS (or plugin) that can serve and edit content located in a Git repository. I'm sick of having my content in a db. Users, settings, comments, fine. But no more content.

Each live edit to a page will need to be automatically, immediately committed to prevent the need for server-side merging. Also, whenever new changes are pushed, they will need to be immediately updated on the filesystem.

Refinery CMS documentation seems to do something similar, although perhaps with a remote repository.

I've read about GitModel and git-blog, but I'm still looking for something that matches my needs a bit closer. [EDIT: GitModel is too hard to edit by hand when used with most CMSes, and git-blog uses static file generation.]

EDIT: My bias against databases for content only applies to sites that need a high degree of customization, and can't use any CMS as-is. Sites whose code evolves as much as its content. This is when the having content in a DB is an utter nightmare. When you need to fork the content and code at the same time, them merge them both into production later. DBs don't branch and merge.

I have such a site.

The performance argument in favor of DB-only content is null and void. I wrote a CMS 5 years ago that synchronizes the database from the filesystem, where the filesystem is always the master copy. It scaled easily to 100,000 pages, maintaining 10ms response times and 2s reindex times. Fully searchable indexes of all the content, metadata, tags, dates, etc. And heck, I wrote it in the slowest, most painful framework on the planet, ASP.NET. It actually almost made ASP.NET bearable, and it has served various companies extremely well, since they had the same kind of site as mentioned above.

Small sites can simply use an in-memory cache, skipping the db content altogether

A valid argument for db-only content is scalability of editing. Editors must all use the same server, although changes can be replicated outward. But in the case of quick-changing, highly customized sites who change code as often as content, distributed/community editing of said code and content is unlikely. Community/distributed editing can use a different system.

So far, the closest I have come is using Cloud9 to edit a git repository of content (Nesta CMS), then push the changes via the command line. It's slow, but at least it's web-based in case my dev machine isn't handy which I discover I misspelled my name in an article. Still looking for better options.

like image 906
Lilith River Avatar asked Mar 20 '11 14:03

Lilith River


People also ask

Can git be used with content management systems?

Content management and Git Even better, because the content is part of a file, you get all the benefits of Git for your content. Static site generators typically take this approach by sourcing content from Markdown and other source files.

Can I use GitHub as CMS?

GitHub is your CMS now and here's how it works: Write a markdown file (with front matter). Open up GitHub and go to the project repository. Click into the “Articles” directory, and upload the new article.

What is a git-based CMS?

A Git-based CMS lets your content authors and software developers work together seamlessly to deliver the high-value digital experiences your audience needs. A distributed repository allows your developers to work locally with the tools they already know while offering support through Git-based branching and workflow.

Is CMS headless free?

No headless CMS is truly free. So, let's tweak our requirements and find an option that gives us the most power and flexibility for the lowest cost.


2 Answers

Gollum (https://github.com/github/gollum) is a Git-powered wiki written by GitHub in Sinatra. You can both push and pull from command line or use the included web interface to edit content.

Unfortunately it seems like GitHub have some what abandon development/maintenance of it, so it has some rough edges. It's also very basic, so it does not include features such as authentication[1].

I'm gonna use Gollum with gollum-site (https://github.com/dreverri/gollum-site), a static file generator for Gollum, and just use Gollum as the admin backend.

1: A basic solution to authentication can be found at https://github.com/github/gollum/issues/107#issuecomment-2608061


There is also Regulate, https://github.com/quickleft/regulate:

Rails 3 engine that provides a Git backed CMS that allows for an admin to define editable regions in a page view.

like image 125
dentarg Avatar answered Sep 20 '22 22:09

dentarg


Your solution might be too confusing later and you may have more headaches later.

I advice this: (1) Use a NoSQL such as MongoDB. (2) Migrate all your data from previous DB. (3) Then put your DB under versioning with. You can, since it's document-based and not SQL.

Mongo has an excellent Gem too, called MongoID https://github.com/mongoid/mongoid

This way you can use a CMS which has much bigger community (like Refinery). Further more: your DB backups solved easily becuase you are able to roll back anytime with Git or simply clone your DB sometimes, also you can automatize backups, etc.

HTH

like image 24
YogiZoli Avatar answered Sep 21 '22 22:09

YogiZoli