Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 153 lines (109 sloc) 8.046 kb
77cf36d @pote basic readme
authored
1 # Planet.rb
2
addfb10 @pote Nicer formatting, ignoring gemspec file
authored
3 ## Important!
4
c280552 @pote better formatting?
authored
5 This IS a work in progress, although most functionality is already implemented, do not expect much stability, and of course patches are appreciated. :)
7486524 @pote better readme
authored
6
7 This gem is also **[gloriously untested](http://jamiesharpe.info/image/comics/haters/haters_gonna_hate3.jpg)** so I will assume that each time we use it a TDD enthusiast's head explodes. I expect, of course, to add some testing later, but for now I'd rather focus on functionality.
addfb10 @pote Nicer formatting, ignoring gemspec file
authored
8
9 ## What is this devilry?
77cf36d @pote basic readme
authored
10
a73271b @pote Added links to octopress and jekyll
authored
11 An awesome RSS/Atom feed aggregator designed with [Octopress](http://octopress.org/)/[Jekyll](http://jekyllrb.com/) in mind, it will parse a given
c280552 @pote better formatting?
authored
12 list of blogs and output them in a format suitable for usage with these amazing blogging engines.
77cf36d @pote basic readme
authored
13
3077e25 @pote why? added
authored
14 ## Why?
15
16 * Most companies want a nice company blog with interesting stuff on it.
17 * Most coders will prefer to write on their own blogs, nobody wants to write interesting stuff on their company blog when they could write it on their own.
18 * planet.rb bridges that gap, your coders/designers/whatever can write on their own blogs, the company can have that content (with proper credits for the author, links to their blog and twitter).
19 * Everybody wins with minimum effort! Just set up an octopress blog, a cron job to regenerate it and you are done, the company has a stream of interesting content to show.
20
77cf36d @pote basic readme
authored
21 ## Main Features
22
c280552 @pote better formatting?
authored
23 * Parse blogs, save posts as plain text files, ready to use with Octopress/Jekyll.
856a18d @pote updated documentation
authored
24 * Dead easy to set up.
25 * Can be used on a regular blog, to import posts from other blogs while maintaining proper credits to the original author.
26 * Completely unobstrusive, will not mess up your Octopress or Jekyll set up by changing files around.
7486524 @pote better readme
authored
27
856a18d @pote updated documentation
authored
28 ## Basic Set Up
7486524 @pote better readme
authored
29
30 So let's assume we have an [Octopress](http://octopress.org) blog. If you are not familiar with Octopress/Jekyll I suggest to check out its [documentation](http://octopress.org/docs/) before going any further.
31
c280552 @pote better formatting?
authored
32
33 ```shell
34 ▸ ls
35 CHANGELOG.markdown README.markdown config.rb public
36 Gemfile Rakefile config.ru sass
37 Gemfile.lock _config.yml plugins source
38 ```
7486524 @pote better readme
authored
39
40 Install the planet.rb gem
41
c280552 @pote better formatting?
authored
42 ```shell
43 ▸ gem install planet
856a18d @pote updated documentation
authored
44 Successfully installed planet-0.2.4
c280552 @pote better formatting?
authored
45 1 gem installed
856a18d @pote updated documentation
authored
46 Installing ri documentation for planet-0.2.4...
47 Installing RDoc documentation for planet-0.2.4...
c280552 @pote better formatting?
authored
48 ```
7486524 @pote better readme
authored
49
f6d05a5 @pote Updated instructions for setup.
authored
50 Create a sample planet.yml config file
7486524 @pote better readme
authored
51
c280552 @pote better formatting?
authored
52 ```shell
53 ▸ planet init
856a18d @pote updated documentation
authored
54 => Created default planet.yml
c280552 @pote better formatting?
authored
55 ```
7486524 @pote better readme
authored
56
57 You will most likely want to edit this yml file (unless you reallly really like me and [Cubox](http://cuboxlabs.com)!), after you are done, run the generate command.
58
c280552 @pote better formatting?
authored
59 ```shell
60 ▸ planet generate
4f3eae6 @pote correction to match latest gem version
authored
61 => You are missing some files in your templates directory, planet.rb will create them for you - make sure to review them on source/_layouts/!
4470299 @pote Updated usage documentation
authored
62 => Created default source/_layouts/author.html
63 => Created default source/_layouts/header.md
4f3eae6 @pote correction to match latest gem version
authored
64 => Parsing http://blog.poteland.com/atom.xml
4470299 @pote Updated usage documentation
authored
65 => Found post titled I made a pretty gem - Planet.rb - by Pablo Astigarraga
4f3eae6 @pote correction to match latest gem version
authored
66 => Parsing http://blog.cuboxlabs.com/atom.xml
856a18d @pote updated documentation
authored
67 => Found post titled Mozilla Developer Network Hack Day Montevideo 2012 - by Cubox
4470299 @pote Updated usage documentation
authored
68 => Found post titled Cubox brings back Ruby meetups to Montevideo - by Cubox
69 => Found post titled We're hiring - by Cubox
70 => Found post titled rubydeps - New gem by Cuboxer - by Cubox
71 => Found post titled Cuboxers at wroc_love.rb in Poland - by Cubox
72 => Found post titled Open Source Projects - by Cubox
73 => Found post titled Machine learning in perspective - by Cubox
74 => Found post titled Cubox on finances - by Cubox
75 => Found post titled So what is Uruguay like? - by Cubox
76 => Found post titled Supporting this weekend's Rails Bugmash - by Cubox
77 => Found post titled One App in the App Store - by Cubox
78 => Found post titled A new website - by Cubox
79 => Found post titled Google Chrome OS: Obvious to the point of being boring. - by Cubox
856a18d @pote updated documentation
authored
80 => Writing 14 posts to the source/_posts/ directory
c280552 @pote better formatting?
authored
81 ```
7486524 @pote better readme
authored
82
4470299 @pote Updated usage documentation
authored
83 And that's it! your source/_posts/ directory (or whatever you selected in your planet.yml file) should be populated with all relevant posts from the blogs you've configured, and it's ready to be consumed by Octopress. :)
7486524 @pote better readme
authored
84
856a18d @pote updated documentation
authored
85 ## planet.yml
86
87 The planet.yml file contains the basic config options for planet. It consists of some basic fields that need to be there, as well as some that can be simply ignored or just picked up from the feed. Namely
88
89 ```yaml
90 planet:
91 posts_directory: source/_posts/ # => Posts text files will be written into this directory
92 templates_directory: source/_layouts/ # => Planet specific layouts will be saved here, I suggest that it matches your Octopress/Jekyll layout directory.
93
94 blogs:
95 - author: "Cubox" # => Name that we will use as the author of this post (soon you wont have to specify this :)
96 feed: "http://blog.cuboxlabs.com/atom.xml" # => RSS/Atom feed
97 image: "http://cubox-website.s3.amazonaws.com/i-work-at-cubox/i-work-at-cubox-badge-small.png" # => Image to use when doing credits
98
99 - author: "Pablo Astigarraga"
100 feed: "http://blog.poteland.com/atom.xml"
101 image: "http://poteland.com/images/avatars/red_mage.png"
102 twitter: "poteland" # => Do you want a link to the user's twitter account next to the credits? You got it.
103 url: "http://blog.poteland.com" # => This is not needed in most cases, because it's picked up from the feed, but if it's not on the feed
104 # then planet will ask you to specify it. :)
105
106 ```
107
76f23ea @pote updated documentation
authored
108 ## Layouts
109
110 So this is pretty sweet: planet.rb doesn't really want to inject html and random stuff that you can't control into your posts, that's why it uses templates to handle the extra text (namely: the header and footer of each post). This files are by default created in source/_layouts, and this is the list of stuff you can dynamically put in there, along with what you would get form it on my own blog.
111
112 ```mustache
113 {{ post_title }} # => "I Made a Pretty Gem - Planet.rb"
114 {{ post_url }} # => "http://blog.poteland.com/blog/2012/04/14/i-made-a-pretty-gem-planet-dot-rb/"
115 {{ post_date }} # => "2012-04-14 05:17:00 UTC"
116 {{ post_content }} # => "I’ve been hurting to write this ever since we had the idea of creating a Planet for Cubox..." (Continued)
117 {{ blog_name }} # => "This is where I tell you stuff"
118 {{ blog_url }} # => "http://blog.poteland.com"
119 {{ image_url }} # => "http://poteland.com/images/avatars/red_mage.png"
120 {{ author }} # => "Pablo Astigarraga"
121 {{ twitter }} # => "poteland"
122 {{ twitter_url }} # => "http://twitter.com/poteland"
123 ```
124
1f7b798 @pote Typo.
authored
125 So feel free to customize planet.rb layouts any way you see fit (but please don't take away the author.html file! You should definitely give credit to the author of hte post)
856a18d @pote updated documentation
authored
126
6eea85d @pote cuboxlabs is using it!
authored
127 # In The wild
128
20aafef @pote Proper link to cubox blog
authored
129 ## planet.rb is used in the following websites (that I know of)
6eea85d @pote cuboxlabs is using it!
authored
130
20aafef @pote Proper link to cubox blog
authored
131 * [blog.cuboxlabs.com](http://blog.cuboxlabs.com) - Where it coexists with Cubox's own posts, it has at the time of this writing about double the content it would have without planet.rb :)
6eea85d @pote cuboxlabs is using it!
authored
132
856a18d @pote updated documentation
authored
133
de94f79 @pote migrate your blog stuff
authored
134 ## Migrate your blog to Octopress using planet.rb!
135
136 I've written a brief [blog post](http://blog.poteland.com/blog/2012/04/20/migrate-your-blog-to-octopress-using-planet-dot-rb/) about how to do this. Works like a charm :).
137
138
4062bfd @pote Samus started contributing! :)
authored
139 ## Contributors
140
141 * [Samus_](https://github.com/git2samus) - His work on planet.rb is being sponsored by [Globant](http://www.globant.com/)
142
143
eb2f202 @pote removed TODO (taken to github issues), added sponsoship
authored
144 # Sponsorship
145
2584325 @pote Missing parenthesis, I feel like I'm writing lisp.
authored
146 This project is sponsored by the amazing people at [Cubox](http://cuboxlabs.com) that make it possible for me to work on this without dying of starvation, BIG THANKS to them! (oh, and their [blog](http://blog.cuboxlabs.com) uses planet.rb, too! ;) )
58eef6a @pote Update README.md
authored
147
148 <div align="center">
8a80e95 @pote link for cubox image
authored
149 <a href="http://cuboxlabs.com">
150 <img src="http://poteland.com/images/cubox-logo-web-transparent.png" alt="Available for Awesomeness"/>
151 </a>
3077e25 @pote why? added
authored
152 </div>
Something went wrong with that request. Please try again.