CMS for Cloud.
CMS written in Ruby for cloud computing.
$ git clone git://github.com/lokka/lokka.git
$ cd lokka
$ bundle install --without=production:test
$ bundle exec rake db:setup
$ bundle exec rackup
View at: http://localhost:9292/
$ git clone git://github.com/lokka/lokka.git
$ cd lokka
$ heroku create
$ git push heroku master
$ heroku addons:add heroku-postgresql:hobby-dev
$ heroku rake db:setup
$ heroku open
or just copy and paste
curl -L http://bit.ly/ROX0lk | bash -s
to your terminal
$ bin/docker_gemfile
$ docker-compose build
$ docker-compose run --rm app bundle exec rake db:setup
$ docker-compose up
open http://localhost:9292 on your browser.
rake spec
Make a directory for theme in public/theme and you need to create entries.erb and entry.erb at least. (erb, haml and slim is available.)
public/theme/example/entries.haml:
!!! XML
!!!
%html
%head
%title Example
%body
%h1= @site.title
- @entries.each do |entry|
%h2= entry.title
.body= entry.body
public/theme/example/entry.haml:
!!! XML
!!!
%html
%head
%title Example
%body
%h1= @site.title
%h2= @entry.title
.body= @entry.body
Lokka Plugin is subset of Sinatra Extension. but Lokka had a specific rules of nomenclature.
If you need display “Hello, World” when access to “/hello”, Write a following.
public/plugin/lokka-hello/lib/lokka/hello.rb:
module Lokka::Hello
def self.registerd(app)
app.get '/hello' do
'hello'
end
end
end
Copyright © 2010 Masaki Komagata. See LICENSE for details.