A super simple, minimal cms for rails. Unleash your content by letting your copilot take the wheel!
- Add
gem 'copilot', git: 'https://github.com/launchpadlab/copilot.git'to your Gemfile - Run
rails generate copilot:install - Add
//= require jqueryand//= require copilot/applicationto your application.js - Add
*= require copilot/applicationto your application.css - Add some editable text to your erb files with
<%= copilot_text 'slug', 'Editable Text' %>or
<%= copilot_text 'slug' do %>
Editable Text
<% end %>- Add a header to be able to edit login
<%= copilot_edit_panel %> - Visit
/cms/adminto login.
By default, slugs are prefixed using the controller and action handling the request so "slug.foo" becomes "controller_name.action_name.slug.foo". You can override this by prepending a "." to the provided slug so ".slug.foo" will become "slug.foo". Beware, if your slugs are not globally unique, some content may be overwritten.
You can set the app name to display in your CMS header by adding an initializer copilot and setting the config.app_name property.
Copilot adds a table to your database named copilot_content that contains all of the content under the control of copilot.