diff --git a/_plugins/last_modified_at.rb b/_plugins/last_modified_at.rb index 571ca78..d2e8862 100644 --- a/_plugins/last_modified_at.rb +++ b/_plugins/last_modified_at.rb @@ -21,15 +21,12 @@ def render(context) if submodule_path submodule_source = File.join(site_source, submodule_path) submodule_repo = Git.open(submodule_source) - log = submodule_repo.log.first - - #return log.date.strftime("%-d. %B %Y") - # log = submodule_repo.log.path(script_path).first - #if log - #formatted_date = log.date.strftime("%-d. %B %Y") - #return "#{formatted_date} by #{log.author.name} (#{log.author.email})" - #end - + log = submodule_repo.log.path(script_path).first + + if log + formatted_date = log.date.strftime("%-d. %B %Y") + return "#{formatted_date} by #{log.author.name} (#{log.author.email})" + end end return "Ikke tilgængelig"