Posted on June 16, 2013

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.