Merge pull request #4611 from jekyll/draft-time-source-mtime

Merge pull request 4611
This commit is contained in:
jekyllbot 2016-02-29 16:00:52 -08:00
commit 9b889217fa
1 changed files with 5 additions and 1 deletions

View File

@ -68,7 +68,11 @@ module Jekyll
end end
def date def date
data['date'] ||= site.time data['date'] ||= (draft? ? source_file_mtime : site.time)
end
def source_file_mtime
@source_file_mtime ||= File.mtime(path)
end end
# Returns whether the document is a draft. This is only the case if # Returns whether the document is a draft. This is only the case if