Fix mail_to
This commit is contained in:
parent
3214cac153
commit
a6c74b5231
1 changed files with 30 additions and 28 deletions
|
@ -133,12 +133,13 @@ module Middleman
|
||||||
uri = URI(url)
|
uri = URI(url)
|
||||||
url_path = uri.path
|
url_path = uri.path
|
||||||
|
|
||||||
|
if url_path
|
||||||
path = Pathname(url_path)
|
path = Pathname(url_path)
|
||||||
url_path = current_source_dir.join(path).to_s if path.relative?
|
url_path = current_source_dir.join(path).to_s if path.relative?
|
||||||
|
|
||||||
resource = sitemap.find_resource_by_path(url_path)
|
resource = sitemap.find_resource_by_path(url_path)
|
||||||
|
|
||||||
# Allow people to turn on relative paths for all links with set :relative_links, true
|
# Allow people to turn on relative paths for all links with config[:relative_links] = true
|
||||||
# but still override on a case by case basis with the :relative parameter.
|
# but still override on a case by case basis with the :relative parameter.
|
||||||
effective_relative = relative || false
|
effective_relative = relative || false
|
||||||
if relative.nil? && relative_links
|
if relative.nil? && relative_links
|
||||||
|
@ -169,6 +170,7 @@ module Middleman
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
super(*args, &block)
|
super(*args, &block)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue