1{{ define "repo/pulls/fragments/og" }}
2 {{ $title := printf "%s #%d" .Pull.Title .Pull.PullId }}
3 {{ $description := or .Pull.Body .RepoInfo.Description }}
4 {{ $url := printf "https://tangled.org/%s/pulls/%d" .RepoInfo.FullName .Pull.PullId }}
5 {{ $imageUrl := printf "https://tangled.org/%s/pulls/%d/opengraph" .RepoInfo.FullName .Pull.PullId }}
6
7 <meta property="og:title" content="{{ unescapeHtml $title }}" />
8 <meta property="og:type" content="object" />
9 <meta property="og:url" content="{{ $url }}" />
10 <meta property="og:description" content="{{ $description }}" />
11 <meta property="og:image" content="{{ $imageUrl }}" />
12 <meta property="og:image:width" content="1200" />
13 <meta property="og:image:height" content="600" />
14
15 <meta name="twitter:card" content="summary_large_image" />
16 <meta name="twitter:title" content="{{ unescapeHtml $title }}" />
17 <meta name="twitter:description" content="{{ $description }}" />
18 <meta name="twitter:image" content="{{ $imageUrl }}" />
19{{ end }}