Skip to content

ComfortableMexicanSofa is a powerful Rails 5.2+ CMS (Content Management System) Engine

License

Notifications You must be signed in to change notification settings

whitesmith/comfortable-mexican-sofa

 
 

Repository files navigation

ComfortableMexicanSofa

ComfortableMexicanSofa is a powerful Ruby on Rails 5.2+ CMS (Content Management System) Engine

Gem Version Gem Downloads Build Status Dependency Status Code Climate Coverage Status Gitter

!!! NOTE !!!

This is master branch that's not production ready just yet (Rails 5.2 is not out). For currently released gem please reference branch 1.12

If you want to use it with bleeding-edge Rails, add this your Gemfile:

gem "rails",
  github: "rails/rails"
gem "arel",
  github: "rails/arel"

# There's no gem published for Bootstrap4 just yet
gem "bootstrap_form",
  github: "bootstrap-ruby/rails-bootstrap-forms",
  branch: "bootstrap-v4"

gem "comfortable_mexican_sofa",
  github: "comfy/comfortable-mexican-sofa"

Features

  • Simple drop-in integration with Rails 5.2+ apps with minimal configuration
  • CMS stays away from the rest of your application
  • Powerful page templating capability using Content Tags
  • Multiple Sites from a single installation
  • Multi-Language Support (i18n) (cs, da, de, en, es, fr, it, ja, nb, nl, pl, pt-BR, ru, sv, tr, uk, zh-CN, zh-TW) and page localization.
  • CMS Seeds for initial content population
  • Revision History to revert changes
  • Great extendable admin interface built with Bootstrap 4. Using CodeMirror for HTML and Markdown highlighing and Redactor as a WYSIWYG editor.

Dependencies

  • File attachments are handled by ActiveStorage. Make sure that you can run appropriate migrations by running: rails active_storage:install
  • Image resizing is done with with ImageMagick, so make sure it's installed.
  • Pagination is handled by kaminari or will_paginate. Please add one of those to your Gemfile.

Installation

Add gem definition to your Gemfile:

gem 'comfortable_mexican_sofa', '~> 2.0.0'

Then from the Rails project's root run:

bundle install
rails generate comfy:cms
rake db:migrate

Now take a look inside your config/routes.rb file. You'll see where routes attach for the admin area and content serving. Make sure that content serving route appears as a very last item or it will make all other routes to be inaccessible.

comfy_route :cms_admin, path: "/admin"
comfy_route :cms, path: "/"

Quick Start Guide

After finishing installation you should be able to navigate to http://yoursite/admin

Default username and password is 'username' and 'password'. You probably want to change it right away. Admin credentials (among other things) can be found and changed in the cms initializer: /config/initializers/comfortable_mexican_sofa.rb

Before creating pages and populating them with content we need to create a Site. Site defines a hostname, content path and its language.

After creating a Site, you need to make a Layout. Layout is the template of your pages; it defines some reusable content (like header and footer, for example) and places where the content goes. A very simple layout can look like this:

<html>
  <body>
    <h1>{{ cms:text title }}</h1>
    {{ cms:wysiwyg content }}
  </body>
</html>

See Wiki entry on available Tags you can use

Once you have a layout, you may start creating pages and populating content. It's that easy.

For more information please refer to Wiki.

Sofa's Page Edit View

Help and Contact

Gitter: https://gitter.im/comfy/comfortable-mexican-sofa

Twitter: @GroceryBagHead

Acknowledgements


ComfortableMexicanSofa is released under the MIT license

Copyright 2009-2017 Oleg Khabarov

About

ComfortableMexicanSofa is a powerful Rails 5.2+ CMS (Content Management System) Engine

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 87.4%
  • HTML 7.6%
  • CoffeeScript 2.9%
  • CSS 1.9%
  • Roff 0.2%