Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alejandrodevs/rails_blog
A basic blogging rails engine.
https://github.com/alejandrodevs/rails_blog
Last synced: about 1 month ago
JSON representation
A basic blogging rails engine.
- Host: GitHub
- URL: https://github.com/alejandrodevs/rails_blog
- Owner: alejandrodevs
- License: mit
- Created: 2013-07-10T20:42:41.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2014-02-05T18:43:56.000Z (almost 11 years ago)
- Last Synced: 2023-05-07T02:16:33.848Z (over 1 year ago)
- Language: Ruby
- Size: 768 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: MIT-LICENSE
Awesome Lists containing this project
README
# RailsBlog
This gem aims to provide a simple and basic blogging engine in Rails 4. Fully customizable.
## Installation
Add this line to your application's Gemfile:
gem 'rails_blog'
And then execute:
$ bundle install
## Getting started
Add this line to your application's Gemfile and execute bundle install:
gem 'devise', github: 'plataformatec/devise', branch: 'rails4'
Run this generator:
rails generate rails_blog:install
Copy engine migrations:
rake rails_blog:install:migrations
Run them:
rake db:migrate
Start solr server:
rake sunspot:solr:start
And in your routes.rb file add this line:
mount RailsBlog::Engine => '/blog'
Create an admin user in your console:
```ruby
RailsBlog::Admin.create(name: "name", email: "email", password: "password")
```**Enjoy it!**
## Adding post comments
Run this generator and implement post comments in that file:
rails generate rails_blog:comments:views
**Note:** That view will be rendered in the post show view.
## Sharing posts
Run this generator and add social sharing implementation in that file:
rails generate rails_blog:sharing:views
**Note:** That view will be rendered in the post show view.
## Overwriting default sidebar views
Run this generator and edit the files:
rails generate rails_blog:sidebar:views
## Adding sidebar views
The sidebar views should be in your `app/views/rails_blog/sidebar` folder and they should be configured in the `rails_blog.rb` initializer file.
###### Example...
Create `_example.html.erb` partial view in your `app/views/rails_blog/sidebar` folder.
```html
This is a sidebar view example
```Configure the sidebar view in the `rails_blog.rb` initializer file:
```ruby
config.siderbar_widgets.add :example, order: 4 # <= Add your new sidebar view.
```**Note:** The order option refers to the order that the sidebar views will be displayed.
Restart the server and it's done.
## Contributing
1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request