Sha256: 342d3d330cf502ecd330177c4ba78b3d10b58880c58ed359554c926fae3cd2ca

Contents?: true

Size: 1.52 KB

Versions: 1

Compression:

Stored size: 1.52 KB

Contents

# Rollin

A Ruby minimalistic filesystem based blog engine made for developers.

Different from other blog engines Rollin only does what matters, and leave the rest to you.

Rollin currently only supports Markdown format and uses the Github's awesome redcarpet.

## Installation

Add the dependency to your Gemfile:

    gem 'rollin'

## Usage

### Filesystem structure

First you will need to have the following structure in your filesystem.

    ├── my_posts
        └── 2013_05_01_My_first_post.mk

### Getting the articles

In your code.
    
    blog = Rollin::Blog.new({article_folder: "my_posts"}) # Defaults to "articles"
    
    anArticle = blog.articles.first

    anArticle.id     # => "2013_05_01_My_first_post"
    anArticle.title  # => "My first post"
    anArticle.body   # => "<h3>My first post!</h3>\n<p>blah blah blah</p>"

    anArticle.date   # => #<Date: 2013-05-01 ((2456414j,0s,0n),+0s,2299161j)>
    anArticle.year   # => 2013
    anArticle.month  # => 05
    anArticle.day    # => 01

### Getting the archive

    a_monthly_archive = blog.monthly_archive.first

    a_monthly_archive.year      # => 2013
    a_monthly_archive.month     # => 5
    a_monthly_archive.articles  # => [ Rollin::Article(:title => "My first post" ...) ]

### Finding an article

    blog.find_article_by_id('2013_05_01_My_first_post')  # => #Rollin::Article(:title => "My first post" ...)

## Build status

[![Build Status](https://travis-ci.org/marano/rollin.png)](https://travis-ci.org/marano/rollin)

## Contributing

1. Pull request!

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rollin-0.0.13 README.md