Blogelator
Blogelator is a mountable Rails::Engine
for adding a blog to your Rails app.
Demo
Check out Blogelator in action. No login required. Content resets every hour.
Features
- Awesome writing experience for developers with GitHub Flavored Markdown
- Ember.js backend with live GFM -> HTML preview
- Upload images to Amazon S3 via drag and drop
- Follows Spree's conventions for extending and overriding defaults
Installation
Add this line to your application's Gemfile:
gem "blogelator"
Install the Blogelator gem with Bundler:
$ bundle install
Use the install generator to set up Blogelator:
$ rails g blogelator:install
Configuration
The install generator will create config/initializers/blogelator.rb
:
Blogelator.posts_per_page = 5
Blogelator.site_name = "My Awesome Blog"
Blogelator.user_class = "User"
Blogelator.s3_access_key_id = ENV["BLOGELATOR_S3_KEY"]
Blogelator.s3_secret_access_key = ENV["BLOGELATOR_S3_SECRET"]
Blogelator.s3_bucket = ENV["BLOGELATOR_S3_BUCKET"]
Authentication
Blogelator does not include authentication because there's a good chance you've already added authentication to your Rails app.
TODO: Add info about requirements/configuration.
Authorization
Blogelator uses CanCan for authorization. By default, any logged in user can create, update, and delete any blog post.
TODO: Add example for limiting access to admin users.
Styles
The install generator will create three SCSS files in app/assets/stylesheets/blogelator/
:
- _variables.scss - Easiest way to change fonts and/or colors
- admin.css.scss - Loads the default styles for the backend
- application.css.scss - Loads the default styles for the frontend
Views
View customization can be done by using Deface or by replacing view templates. If you have experience with customizing Spree, you'll be right at home. Blogelator aims to follow Spree's conventions, so you can simply follow their documentation:
TODO: Add example for using Deface to add author's name to post
Contributing
- Fork it
- 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 new Pull Request