`.present?` changed to `to_s.empty?` as `.present?` is rails specific
This commit is contained in:
parent
1e6110ddef
commit
ab49d7b5e8
|
@ -183,7 +183,7 @@ module Jekyll
|
|||
|
||||
def canonical_url
|
||||
@canonical_url ||= begin
|
||||
if page["canonical_url"].present?
|
||||
if !page["canonical_url"].to_s.empty?
|
||||
page["canonical_url"]
|
||||
else
|
||||
filters.absolute_url(page["url"]).to_s.gsub(%r!/index\.html$!, "/")
|
||||
|
|
Loading…
Reference in New Issue