Nephos/RoR5GenericBlog

Generic blog in Ruby on Rails 5 - minimal blog

โ˜… 0Forks 0RubyGitHub โ†—Compare

Project website โ†—

blogruby-on-rails

README

RoR5 Generic Blog

Setup

bundle install

export RAILS_ENV=production
export SECRET_KEY_BASE=your_devise_key

rake db:create db:migrate

cp blog.yml.sample blog.yml
edit blog.yml
echo "User.create email: '[email protected]', password: 'password'" | rails c

rails server -p 3000

Routes

/read(:format)      # list the 10 last articles with
/read
/read.html
/read.json
/read.rss
/read/:id.(:format) # fetch the complete article (replace :id with an integer)
/read/:id
/read/:id.html
/read/:id.json
/read/:id.tex
/read/:id.pdf
/read/:id.md
/last               # fetch the last published article

Write your blog

In the article, write markdown. You can use "~~~" in order to have a short and long version of the article (the short version is presented in the home index of the article)

Issues