{{ define "repo/pulls/fragments/og" }}
    {{ $title := printf "%s #%d" .Pull.Title .Pull.PullId }}
    {{ $description := or .Pull.Body .RepoInfo.Description }}
    {{ $url := printf "https://tangled.org/%s/pulls/%d" .RepoInfo.FullName .Pull.PullId }}
    {{ $imageUrl := printf "https://tangled.org/%s/pulls/%d/opengraph" .RepoInfo.FullName .Pull.PullId }}

    <meta property="og:title" content="{{ unescapeHtml $title }}" />
    <meta property="og:type" content="object" />
    <meta property="og:url" content="{{ $url }}" />
    <meta property="og:description" content="{{ $description }}" />
    <meta property="og:image" content="{{ $imageUrl }}" />
    <meta property="og:image:width" content="1200" />
    <meta property="og:image:height" content="600" />

    <meta name="twitter:card" content="summary_large_image" />
    <meta name="twitter:title" content="{{ unescapeHtml $title }}" />
    <meta name="twitter:description" content="{{ $description }}" />
    <meta name="twitter:image" content="{{ $imageUrl }}" />
{{ end }}
