class Bridgetown::Resource::Base

Public Instance Methods

sitemap_last_modified_at() click to toggle source
# File lib/bridgetown/resource/base.rb, line 6
def sitemap_last_modified_at
  data.last_modified_at || latest_git_commit_date || date
end

Private Instance Methods

latest_git_commit_date() click to toggle source
# File lib/bridgetown/resource/base.rb, line 12
def latest_git_commit_date
  date = `git log -1 --pretty="format:%cI" "#{path}"`
  Time.parse(date) if date.present?
end