Skip to content
Browse files

Expose page.path to post templates.

Can be used for for e.g. "Edit in TextMate" links. See http://github.com/henrik/henrik.nyh.se.
  • Loading branch information...
1 parent c0e96dd commit 1a3a581e6fd0b4c33aba5df506341ca7bde69e09 @henrik henrik committed Apr 18, 2009
Showing with 8 additions and 0 deletions.
  1. +8 −0 lib/jekyll/post.rb
View
8 lib/jekyll/post.rb
@@ -155,6 +155,13 @@ def date
end
end
end
+
+ # The path to the post file.
+ #
+ # Returns <String>
+ def path
+ File.expand_path(File.join(@base, @name))
+ end
# Calculate related posts.
#
@@ -238,6 +245,7 @@ def to_liquid
"url" => self.url,
"date" => self.date,
"id" => self.id,
+ "path" => self.path,
"topics" => self.topics,
"categories" => self.categories,
"tags" => self.tags,

0 comments on commit 1a3a581

Please sign in to comment.
Something went wrong with that request. Please try again.