From 93afa8ca7234135887d605137983fc14a8f54cb7 Mon Sep 17 00:00:00 2001 From: Tom Preston-Werner Date: Mon, 20 Oct 2008 13:36:37 -0700 Subject: [PATCH] add Post#id --- lib/autoblog/post.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/autoblog/post.rb b/lib/autoblog/post.rb index 4e471231..a76ded25 100644 --- a/lib/autoblog/post.rb +++ b/lib/autoblog/post.rb @@ -35,6 +35,10 @@ module AutoBlog self.dir + self.slug + ".html" end + def id + self.dir + self.slug + end + def read_yaml(base, name) self.content = File.read(File.join(base, name)) @@ -76,6 +80,7 @@ module AutoBlog { "title" => self.data["title"] || "", "url" => self.url, "date" => self.date, + "id" => self.id, "content" => self.content } end end