Project

days

0.01
Repository is archived
No release in over 3 years
Low commit activity in last 3 years
Simple blog system built up with Sinatra.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

~> 3.2.14
~> 3.0.1
~> 3.0.0
~> 3.1.7
~> 0.13
>= 0
~> 2.4.0
~> 2.2.2
~> 3.2.5
~> 1.3.3
~> 2.2.2
~> 1.5.1
~> 0.16.0
 Project Readme

Days

Build Status

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.

Installation

$ gem install days

Set up

$ mkdir foo && cd foo
$ days init
$ days migration

Start development server

$ days server

Access /admin/setup path to setup admin user.

Configuration

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
  • title: Your blog title.

  • database: Database configuration. This will be passed to ActiveRecord::Base.establish_connection.

Deploy

Days is basically Rack app, so you can deploy using thin, unicorn, and puma, etc.

Deploy to Heroku

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.

Contributing

Fork and give me pull-request, please!

To-dos

  • Plugins