/blog-framework

A Rails framework for creating and managing your own blog.

Primary LanguageRuby

README

This is a skeleton rails app intended for creating your own blog, just in case you enjoy re-inventing the wheel. There is Devise authentication for users and admins. Visitors can register and then leave comments on posts (which they can later delete or edit). Admins are able to create posts and also manage all comments. With only a little bit of work, you could allow users access to writing their own blog posts as well, and then you would have the beginning of your own social site.

A Tour of Your Views and Functionality

Blog Home Page - (views/posts/index.html.erb)

Currently this displays excerpts from the three most recent posts based on post.id, not the actual created_at time. “Previous” and “Next” buttons will appear at the bottom of this list as is appropriate, allowing you to navigate through the entire list of posts.

Getting Started

Needs updating as you don’t actually need to do all of these steps to get up and running

To get started, clone this repo to your local system.

Run bundler to install all of the necessary gems.

You may need to run the following:

Run rake db:create

Run rake db:migrate

Run rake db:seed The seed file is a little bare bones at the moment.

Start your rails server rails s

Point your browser to localhost:3000 and you should actually be directed to the /posts route. You can always go in and set your own welcome landing page if you want.

To see all of the routes available run rake routes on the command line. You will need to either stop your server or , better yet, open a new bash window (COMMAND t)

For ActiveAdmin the gem is set to gem 'activeadmin', github: 'activeadmin' which will track the master. This is already done for you, so don’t worry about it.

The ActiveAdmin gem integrates with: gem 'devise' gem 'cancan' gem 'draper' gem 'pundit'

And there are many other gem dependencies, a good portion having to with setting up the app to run smoothly on Heroku.

No you can visit http:/localhost:3000/admin and login as the default user:

User = admin@example.com Password = password

For more information on ActiveAdmin, please visit: https://github.com/activeadmin/activeadmin As the Admin, you can add posts to you heart’s content.

__Note__: The pictures for each blog post are sized for 900x300 and there is no fancy code behind the scenes to scale images. Maybe at some point there will be, but for now, if you want it to look good, size all of your images to those dimensions.

In order to actually deploy, you will need to make use of the figaro gem and the application.yml file. I will eventually set up a wiki to make this easier, but a quick google search should yield the basic info on how to push to github and deploy to heroku without giving away all of your passwords and API keys.

You are now ready to build the rest of your app - Enjoy!

Please feel free to use a different markup language if you do not plan to run rake doc:app.