Add StaticFile#destination_rel_dir
This commit is contained in:
parent
141ce32382
commit
10cc45fc45
|
@ -37,10 +37,14 @@ module Jekyll
|
||||||
#
|
#
|
||||||
# Returns destination file path.
|
# Returns destination file path.
|
||||||
def destination(dest)
|
def destination(dest)
|
||||||
|
File.join(*[dest, destination_rel_dir, @name].compact)
|
||||||
|
end
|
||||||
|
|
||||||
|
def destination_rel_dir
|
||||||
if @collection
|
if @collection
|
||||||
File.join(*[dest, @dir.gsub(/\A_/, ''), @name].compact)
|
@dir.gsub(/\A_/, '')
|
||||||
else
|
else
|
||||||
File.join(*[dest, @dir, @name].compact)
|
@dir
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue