Monorepo for Tangled

appview/pages: improve commit page title

Should look better on opengraph cards.

Signed-off-by: Anirudh Oppiliappan <anirudh@tangled.org>

+6 -2
+6 -2
appview/pages/templates/repo/commit.html
··· 1 - {{ define "title" }} commit {{ .Diff.Commit.This }} &middot; {{ .RepoInfo.FullName }} {{ end }} 2 3 {{ define "extrameta" }} 4 - {{ $title := printf "commit %s &middot; %s" .Diff.Commit.This .RepoInfo.FullName }} 5 {{ $url := printf "https://tangled.org/%s/commit/%s" .RepoInfo.FullName .Diff.Commit.This }} 6 7 {{ template "repo/fragments/og" (dict "RepoInfo" .RepoInfo "Title" $title "Url" $url) }}
··· 1 + {{ define "title" }} 2 + {{ $messageParts := splitN .Diff.Commit.Message "\n\n" 2 }} 3 + {{ index $messageParts 0 }} &middot; {{ .RepoInfo.FullName }}@{{ slice .Diff.Commit.This 0 7 }} 4 + {{ end }} 5 6 {{ define "extrameta" }} 7 + {{ $messageParts := splitN .Diff.Commit.Message "\n\n" 2 }} 8 + {{ $title := printf "%s &middot; %s@%s" (index $messageParts 0) .RepoInfo.FullName (slice .Diff.Commit.This 0 7) }} 9 {{ $url := printf "https://tangled.org/%s/commit/%s" .RepoInfo.FullName .Diff.Commit.This }} 10 11 {{ template "repo/fragments/og" (dict "RepoInfo" .RepoInfo "Title" $title "Url" $url) }}