Sha256: 3dbabfda3369c096f6f1e9493f4092a61ae5260bd3c94f95700762d956b85172
Contents?: true
Size: 507 Bytes
Versions: 3
Compression:
Stored size: 507 Bytes
Contents
# Monkey Patch Jekyll 2.0.0 static file treatment back to Jekyll 1.4.x # See https://github.com/jekyll/jekyll/pull/2075/files module Jekyll class StaticFile # Returns the source file path relative to the site source def relative_path @relative_path ||= path.sub(/\A#{@site.source}/, '') end def to_liquid { "path" => relative_path, "modified_time" => Time.at(mtime), "extname" => File.extname(relative_path) } end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
jekyll-sitemap-0.3.0 | lib/static_file.rb |
jekyll-sitemap-0.2.0 | lib/static_file.rb |
jekyll-sitemap-0.1.0 | lib/static_file.rb |