Sha256: 420d2f3e0c9792920ff603d57aead754c8f9f445fd4ee24d6ff265d64f3306fe
Contents?: true
Size: 1.43 KB
Versions: 1
Compression:
Stored size: 1.43 KB
Contents
= Kblog Simple blog-engine for rails. Authentication can be done either role-based or via http-basic-auth. No specific authentication-framework needed. No relation to author present. == installation * gem install kblog * rake kblog:migrations:install * rake db:migrate * rails g kblog # creates kblog_init.rb in config/initializers * add the engine to route.rb: # routes.rb mount Kblog::Engine => "/kblog" * perhaps add provided css to your layoutfile: <%= stylesheet_link_tag 'kblog/articles', :media => "all" %> adopt config/initializer/kblog_init.rb: <b>role-based authentication</b>:: role-based rights to create/alter blog-articles user_class must respond_to :roles - and each roles string representation <tt>role.to_s == Kblog.auth_role</tt> expects *current_user* beeing available in views and controller # config/initializer/kblog_init.rb Kblog.auth_type = 'role' Kblog.auth_role = 'blogger' # role needed to alter blogs <b>basic-auth</b>:: makes use of simple http-basic auth. configure with desired name/passwword # config/initializer/kblog_init.rb Kblog.auth_type == 'basic' Kblog.authname = 'blogger' Kblog.authpassword = 'changeme' == usage * add helper use it for displaying <num> articles. if argument <truncate> is greater than 0 - blog-text will be truncated after <truncate> chars <%= display_latest_articles(num,truncate=0) %> to your views * if mounted to /kblog visit index: /kblog/articles -
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
kblog-0.0.4 | README.rdoc |