Skip to content

Commit

Permalink
compatibility with jekyll-assets (#15)
Browse files Browse the repository at this point in the history
* fix: local image filepath

* use parameter

Signed-off-by: Sebastian Schmidt <[email protected]>
  • Loading branch information
publicarray authored and juusaw committed Nov 27, 2016
1 parent 0cea565 commit 013139f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions amp_filter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def amp_images(input, responsive = true, wi = nil, he = nil)
else
# FastImage doesn't seem to handle local paths when used with Jekyll
# so let's just force the path
src = File.join(Dir.pwd, image['src'])
src = File.join(Dir.pwd, '_site', image['src'])
end
# Jekyll generates static assets after the build process.
# This causes problems when trying to determine the dimensions of a locally stored image.
Expand All @@ -47,4 +47,4 @@ def amp_images(input, responsive = true, wi = nil, he = nil)
end
end

Liquid::Template.register_filter(Jekyll::AmpFilter)
Liquid::Template.register_filter(Jekyll::AmpFilter)

0 comments on commit 013139f

Please sign in to comment.