This tumblr will be replaced with a small ruby script

…which will probably look like this:

get '/' do

  @posts = {}

  Dir.foreach('posts') { |filename|

    if filename.end_with?('.md')

      file_creation_time = File.ctime('posts/'+filename)
      post_as_plain_text = File.open('posts/'+filename).read
      post_as_html = Kramdown::Document.new(post_as_plain_text).to_html

      @posts[file_creation_time] = post_as_html
    end
  }

  @posts = @posts.sort.reverse

  erb :index
end

its name is Bloguito and you can follow the progress on github.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: