mirror of
https://github.com/middleman/middleman.git
synced 2022-11-09 12:20:27 -05:00
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)
|
||||
url_path = uri.path
|
||||
|
||||
if url_path
|
||||
path = Pathname(url_path)
|
||||
url_path = current_source_dir.join(path).to_s if path.relative?
|
||||
|
||||
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.
|
||||
effective_relative = relative || false
|
||||
if relative.nil? && relative_links
|
||||
|
@ -169,6 +170,7 @@ module Middleman
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
super(*args, &block)
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue