diff --git a/lib/jekyll/static_file.rb b/lib/jekyll/static_file.rb index 3d863ca7..bc39b178 100644 --- a/lib/jekyll/static_file.rb +++ b/lib/jekyll/static_file.rb @@ -21,6 +21,11 @@ module Jekyll File.join(@base, @dir, @name) end + # Returns the source file path relative to the site source + def relative_path + path.sub(/\A#{@site.source}/, '') + end + # Obtain destination path. # # dest - The String path to the destination dir. @@ -66,5 +71,12 @@ module Jekyll @@mtimes = Hash.new nil end + + def to_liquid + { + "path" => relative_path, + "modified_time" => mtime.to_s + } + end end end