Handle path overrides
This commit is contained in:
parent
4acf343fea
commit
75c5c16297
|
@ -16,8 +16,10 @@ module Jekyll
|
||||||
|
|
||||||
# Add a path to the metadata
|
# Add a path to the metadata
|
||||||
#
|
#
|
||||||
# Returns true.
|
# Returns true, also on failure.
|
||||||
def add(path)
|
def add(path)
|
||||||
|
return true if not File.exist? path
|
||||||
|
|
||||||
@metadata[path] = {
|
@metadata[path] = {
|
||||||
"mtime" => File.mtime(path),
|
"mtime" => File.mtime(path),
|
||||||
"deps" => []
|
"deps" => []
|
||||||
|
@ -71,7 +73,8 @@ module Jekyll
|
||||||
#
|
#
|
||||||
# Returns nothing.
|
# Returns nothing.
|
||||||
def add_dependency(path, dependency)
|
def add_dependency(path, dependency)
|
||||||
add(path) if @metadata[path].nil?
|
return if @metadata[path].nil?
|
||||||
|
|
||||||
@metadata[path]["deps"] << dependency unless @metadata[path]["deps"].include? dependency
|
@metadata[path]["deps"] << dependency unless @metadata[path]["deps"].include? dependency
|
||||||
regenerate? dependency
|
regenerate? dependency
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue