Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sorah/days
Simple blog system built up with Sinatra
https://github.com/sorah/days
Last synced: 3 months ago
JSON representation
Simple blog system built up with Sinatra
- Host: GitHub
- URL: https://github.com/sorah/days
- Owner: sorah
- License: mit
- Archived: true
- Created: 2012-12-17T23:37:03.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2023-11-16T16:54:26.000Z (12 months ago)
- Last Synced: 2024-05-17T11:02:44.996Z (6 months ago)
- Language: Ruby
- Homepage:
- Size: 344 KB
- Stars: 30
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Days
[![Build Status](https://travis-ci.org/sorah/days.png?branch=master)](https://travis-ci.org/sorah/days)
__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](https://github.com/binarylogic/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 restartNow, 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