Simplify conditional in SeoTag::Drop#date_modified (#343)

Merge pull request 343
This commit is contained in:
Ashwin Maroli 2020-10-08 20:43:37 +05:30 committed by GitHub
parent 442133d898
commit e1ff8ee6e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 7 deletions

View File

@ -109,13 +109,7 @@ module Jekyll
def date_modified
@date_modified ||= begin
date = if page_seo["date_modified"]
page_seo["date_modified"]
elsif page["last_modified_at"]
page["last_modified_at"].to_liquid
else
page["date"]
end
date = page_seo["date_modified"] || page["last_modified_at"].to_liquid || page["date"]
filters.date_to_xmlschema(date) if date
end
end