Skip to content

Commit

Permalink
Expose page.path to post templates.
Browse files Browse the repository at this point in the history
Can be used for for e.g. "Edit in TextMate" links. See http://github.com/henrik/henrik.nyh.se.
  • Loading branch information
henrik committed Apr 18, 2009
1 parent c0e96dd commit 1a3a581
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/jekyll/post.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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.
#
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 1a3a581

Please sign in to comment.