diff --git a/appview/pages/templates/repo/commit.html b/appview/pages/templates/repo/commit.html index cd1128aa..964d4e93 100644 --- a/appview/pages/templates/repo/commit.html +++ b/appview/pages/templates/repo/commit.html @@ -1,7 +1,11 @@ -{{ define "title" }} commit {{ .Diff.Commit.This }} · {{ .RepoInfo.FullName }} {{ end }} +{{ define "title" }} + {{ $messageParts := splitN .Diff.Commit.Message "\n\n" 2 }} + {{ index $messageParts 0 }} · {{ .RepoInfo.FullName }}@{{ slice .Diff.Commit.This 0 7 }} +{{ end }} {{ define "extrameta" }} - {{ $title := printf "commit %s · %s" .Diff.Commit.This .RepoInfo.FullName }} + {{ $messageParts := splitN .Diff.Commit.Message "\n\n" 2 }} + {{ $title := printf "%s · %s@%s" (index $messageParts 0) .RepoInfo.FullName (slice .Diff.Commit.This 0 7) }} {{ $url := printf "https://tangled.org/%s/commit/%s" .RepoInfo.FullName .Diff.Commit.This }} {{ template "repo/fragments/og" (dict "RepoInfo" .RepoInfo "Title" $title "Url" $url) }}