Skip to content

Commit ff5d7ac

Browse files
committed
Serious again. No more experiments.
1 parent 03e78a4 commit ff5d7ac

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

_plugins/last_modified_at.rb

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,12 @@ def render(context)
2121
if submodule_path
2222
submodule_source = File.join(site_source, submodule_path)
2323
submodule_repo = Git.open(submodule_source)
24-
log = submodule_repo.log.first
25-
26-
#return log.date.strftime("%-d. %B %Y")
27-
# log = submodule_repo.log.path(script_path).first
28-
#if log
29-
#formatted_date = log.date.strftime("%-d. %B %Y")
30-
#return "#{formatted_date} by #{log.author.name} (#{log.author.email})"
31-
#end
32-
24+
log = submodule_repo.log.path(script_path).first
25+
26+
if log
27+
formatted_date = log.date.strftime("%-d. %B %Y")
28+
return "#{formatted_date} by #{log.author.name} (#{log.author.email})"
29+
end
3330
end
3431
return "Ikke tilgængelig"
3532

0 commit comments

Comments
 (0)