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

    <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 }}
