Giter VIP home page Giter VIP logo

feather_cms's Introduction

Motivation

We have felt the pain of integrating static pages into a Rails application. There are plenty of gems available for this (Radiant, Locomotiv, etc.) but they are very heavy for what we need.

So, we built FeatherCMS. As the name suggests, its a Do-It-Yourself, lightweight CMS - just pages, caching and nothing more!

Usage

Add the gem to your Gemfile

gem 'feather_cms'

Now, generate the pages

# Use file system to store pages( default: public/system/templates)
$ rails g feather_cms about_us jobs team

#Use db to store pages
$ rails g feather_cms about_us jobs team --storage=db
or
$ rails g feather_cms about_us jobs team -t=db

$ rake db:migrate

This generates a route, the controller action and the view for each page. Start the server and use the URL http://localhost:3000/feathers/pages to go to the admin panel.

This has basic HTTP authentication setup.The default username and password are feather/password and you can change this in feathers_controller.rb

  http_basic_authenticate_with name: 'feather', password: 'password', except: :published

Features

  • Creates a route for each static page.
  • Caching the static pages.
  • Creates the view in app/views/feathers folder
  • Easily customization FeathersController
  • CodeMirror Editor for syntax highlighting. (Default: HTML)
  • Storage is file (default) or database.

Caveats

You may need to ensure that the public/system folder exists (for file storage)

TODO

  • Move the basic authentication to the config/initializers/feather_cms.rb
  • Override the default authentication strategy from the controller
  • Move the code from generated controller to the gem (if required)

Contribute

Fork away and send me pull requests!

License

The MIT license

feather_cms's People

Contributors

gautamrege avatar

Stargazers

Sethupathi Asokan avatar

Watchers

Sethupathi Asokan avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.