Fix asset paths in partials
This commit is contained in:
parent
b14ef9be32
commit
9ffbaa101c
@ -1,5 +1,5 @@
|
|||||||
Gem::Specification.new do |spec|
|
Gem::Specification.new do |spec|
|
||||||
spec.version = "0.1.2"
|
spec.version = "0.1.3"
|
||||||
spec.homepage = "http://github.com/abemedia/jekyll-pdf/"
|
spec.homepage = "http://github.com/abemedia/jekyll-pdf/"
|
||||||
spec.authors = ["Adam Bouqdib"]
|
spec.authors = ["Adam Bouqdib"]
|
||||||
spec.email = ["adam@abemedia.co.uk"]
|
spec.email = ["adam@abemedia.co.uk"]
|
||||||
|
|||||||
@ -5,6 +5,7 @@ module Jekyll
|
|||||||
module PDF
|
module PDF
|
||||||
class Partial
|
class Partial
|
||||||
extend Forwardable
|
extend Forwardable
|
||||||
|
include Helper
|
||||||
|
|
||||||
attr_accessor :doc
|
attr_accessor :doc
|
||||||
attr_accessor :partial
|
attr_accessor :partial
|
||||||
@ -76,6 +77,7 @@ module Jekyll
|
|||||||
tempfile = File.absolute_path(File.join(dir, id))
|
tempfile = File.absolute_path(File.join(dir, id))
|
||||||
unless File.exist?(tempfile)
|
unless File.exist?(tempfile)
|
||||||
FileUtils.mkdir_p(File.dirname(tempfile)) unless File.exist?(File.dirname(tempfile))
|
FileUtils.mkdir_p(File.dirname(tempfile)) unless File.exist?(File.dirname(tempfile))
|
||||||
|
fix_relative_paths
|
||||||
File.open(tempfile, 'w') {|f| f.write(to_s) }
|
File.open(tempfile, 'w') {|f| f.write(to_s) }
|
||||||
end
|
end
|
||||||
@output = tempfile
|
@output = tempfile
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user