Skip to content

Commit

Permalink
Last updated info from submodule
Browse files Browse the repository at this point in the history
  • Loading branch information
agnetemoos committed Sep 24, 2024
1 parent 232f000 commit c0d2a8e
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions _plugins/last_modified_at.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,10 @@ def render(context)

if log
formatted_date = log.date.strftime("%-d. %B %Y")
return "#{formatted_date} by #{log.author.name} (#{log.author.email}) #{submodule_repo.repo} #{submodule_repo.dir} #{submodule_repo.current_branch} #{script_path}"
end
github_path = "/home/runner/work/os2borgerpc-docs/os2borgerpc-docs/assets/os2borgerpc-scripts/scripts/" + script_path
githublog = submodule_repo.log.path(github_path).first
if githublog
return "#{githublog.log.date.strftime("%-d. %B %Y")}"
return "#{formatted_date} by #{log.author.name} (#{log.author.email})"
end
end
return "Ikke tilgængelig #{submodule_repo.repo} #{submodule_repo.dir} #{submodule_repo.current_branch} #{script_path} #{script_path}"
return "Ikke tilgængelig"

rescue => e
puts "Debug: Error - #{e.message}"
Expand Down

0 comments on commit c0d2a8e

Please sign in to comment.