Project

serum

0.0
No commit activity in last 3 years
No release in over 3 years
Serum is a simple object model on static posts with YAML front matter.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 10.0.3
~> 3.11
~> 1.2
~> 1.0
~> 3.3.2

Runtime

>= 0.7
 Project Readme

Serum

Serum is a simple object model on static posts with YAML front matter, like Jekyll.

Usage

Instantiate Serum passing in a directory of files that may or may not have YAML front matter:

>> site = Serum.for_dir("posts/")
=> <Site: /Users/bob/posts>

Then ask questions about the posts:

>> site.posts.size
=> 28

>> site.posts.first
=> <Post: /published>

>> site.posts.first.next
=> <Post: /foo-bar>

You can also pass in a 'baseurl' option to for_dir in order to get URL generation on each of the posts:

>> site = Serum.for_dir('posts/', {'baseurl' => '/story'})
=> <Site: /Users/bob/posts>

>> site.posts.first.url
=> "/story/published"

It's really that simple. Sometimes you just want a Ruby object model on top of a simple directory of posts.

Author

Maybe more aptly named "deleter" considering this project's origin.

Brad Fults (bfults@gmail.com)

Acknowledgements

Serum is based entirely on Jekyll from Tom Preston-Werner. Thank you, Tom.

License

MIT License; see LICENSE file.