Be a bit safer about checking source_file in Sitemap Preview. Working towards fixing #1166
This commit is contained in:
parent
e36054b605
commit
65d3a0c84f
|
@ -39,7 +39,7 @@ module Middleman
|
|||
build_path = 'Not built' if ignored?
|
||||
props['Build Path'] = build_path if @resource.path != build_path
|
||||
props['URL'] = content_tag(:a, @resource.url, href: @resource.url) unless ignored?
|
||||
props['Source File'] = @resource.source_file.sub(/^#{Regexp.escape(ENV['MM_ROOT'] + '/')}/, '')
|
||||
props['Source File'] = @resource.source_file ? @resource.source_file.sub(/^#{Regexp.escape(ENV['MM_ROOT'] + '/')}/, '') : 'Dynamic'
|
||||
|
||||
data = @resource.data
|
||||
props['Data'] = data.inspect unless data.empty?
|
||||
|
|
|
@ -66,6 +66,10 @@ module Middleman
|
|||
super(store, path)
|
||||
end
|
||||
|
||||
def get_source_file
|
||||
nil
|
||||
end
|
||||
|
||||
def template?
|
||||
true
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue