Cumis is CMS for u and i!
Cumis is a Ruby CMS that works with Rails and RailsAdmin.
Install the gem and use it to quickly setup pages for your users to edit.
Cumis currently creates a simple database table (via migration) and setup the routing system.
With this infrastucture, you can use any admin gem (or build your own!) such as RailsAdmin to CRUD your pages and easily route url to your pages.
Add this line to your application's Gemfile:
gem 'cumis'
And then execute:
$ bundle
Or install it yourself as:
$ gem install cumis
After installing the gem, run the following:
rails generate cumis:install
It will create two files for you:
- a migration file (CreatePages) which is a database table to store the webpage content.
- a view file (/app/views/cumis/pages/show.html.erb) to display the page Next, run the database migration:
rake db:migrate
Read your db/schema.rb
to know the fields of the Pages table.
You can create/update a page via RailsAdmin or your own backend as it can directly CRUD the database table.
If not, you can also create a page via rails console
.
Once a page is created, you need to setup routes for it in your routes.rb
.
The route to be created is in the format of: get '<url-name>' => 'cumis_pages#show', ref: '<page-ref>'
The page-ref
field corresponds to the ref
field in the Page table.
The following example routes http://example.com/about-us
to the About Us page:
get 'about-us' => 'cumis_pages#show', ref: 'about-us'
- Add menu system
Any feature requests, please raise an issue in this Github page.
- Fork it ( https://github.com/neember/cumis/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request