Discontinued. Everyone now uses JavaScript ecosystem to build websites, and you may find https://github.com/sorah/kozeki as a static blogging backend.
Days is simple blog system built up with Sinatra.
$ gem install days
$ mkdir foo && cd foo
$ days init
$ days migration
$ days server
Access /admin/setup
path to setup admin user.
edit config.yml
. We're using settingslogic to use namespace based on environment.
-
permalink
: URL Style for permalink. String like{TAG}
in URL will replaced with something.- Example:
/{year}/{month}/{id}-{slug}
with entry published in Jan 2013, slug:slug
and id:42
→/2013/01/42-slug
{slug}
- entry slug{id}
- entry id{year}
- year that entry published{month}
- month that entry published{day}
- day that entry published{hour}
- hour that entry published{minute}
- minute that entry published{second}
- second that entry published
- Example:
-
title
: Your blog title. -
database
: Database configuration. This will be passed toActiveRecord::Base.establish_connection
.
Days is basically Rack app, so you can deploy using thin, unicorn, and puma, etc.
First, prepare days app repository
$ days init
$ vim config.yml
...
group :production do
gem "pg"
end
...
$ bundle install --without production
$ git init && git add . && git commit -m 'initial'
Then, create heroku apps and prepare heroku postgres database:
$ heroku apps:create
$ heroku addons:add heroku-postgresql:dev && heroku pg:wait
$ heroku pg:promote `heroku config | grep HEROKU_POSTGRESQL|cut -d: -f 1`
Next, push repository to heroku.
$ git push -u heroku master
Finally, migrate the DB and restart the app.
$ heroku run days migrate production
$ heroku restart
Now, you can access to your new blog by:
$ heroku apps:open
Access /admin/setup
path to setup admin user.
Fork and give me pull-request, please!
- Plugins