Skip to content

Commit

Permalink
Serious again. No more experiments.
Browse files Browse the repository at this point in the history
  • Loading branch information
agnetemoos committed Sep 11, 2024
1 parent 03e78a4 commit ff5d7ac
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions _plugins/last_modified_at.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down

0 comments on commit ff5d7ac

Please sign in to comment.