How to get a hacker to blog…
I enjoy hacking, not blogging. Over the years I have attempted to blog, each time losing interest in favour of some hacking. But times are a changing, and what better way for a hacker to blog, but to blog about his blog related hacking.
fun simple blogging
something somewhat homebrew.
After using Webby for various projects I decided that it was about time to use it for myself. I also did not have a blog so I decided to combine them and now I have a Webby power blog. If your wondering how this is was done feel free to view, modify or play with the source of this webb blog over at Github.
Webby is a tiny static file based website management system written in ruby.
Code duplication sucks, and again this is something larger frameworks help prevent with various templating tricks. Webby brings many of these tricks back to static websites. Here are two core features of the blog gistified:
# Webby provides us with the @pages instance variable, # which is a ruby enumerable of all the pages webby indexes. # The snippet below gives me access to all my blog posts. posts = @pages.find(:all, in_directory: 'blog', recursive: true, sort_by: 'created_at', reverse: true)
# Now we can easily perform some ruby magic to group the # posts by months. posts.group_by do |post| post.created_at.strftime('%B %Y') end.each do |group,posts| # ... end
No regrets using webby to hack together this little blog, but I would like to point out that such a blog is not for everyone. If you are more confortable with a wysiwyg style editor this is probabily not your cup of tea and I would suggest you look into something like Wordpress .