appview/pages: og image for profile #669

merged
opened by anirudh.fi targeting master from push-wmkmzrsvlkmk
Changed files
+9
appview
pages
templates
+9
appview/pages/templates/layouts/profilebase.html
···
{{ define "title" }}{{ or .Card.UserHandle .Card.UserDid }}{{ end }}
{{ define "extrameta" }}
+
{{ $avatarUrl := fullAvatar .Card.UserHandle }}
<meta property="og:title" content="{{ or .Card.UserHandle .Card.UserDid }}" />
<meta property="og:type" content="profile" />
<meta property="og:url" content="https://tangled.org/{{ or .Card.UserHandle .Card.UserDid }}?tab={{ .Active }}" />
<meta property="og:description" content="{{ or .Card.Profile.Description .Card.UserHandle .Card.UserDid }}" />
+
<meta property="og:image" content="{{ $avatarUrl }}" />
+
<meta property="og:image:width" content="512" />
+
<meta property="og:image:height" content="512" />
+
+
<meta name="twitter:card" content="summary" />
+
<meta name="twitter:title" content="{{ or .Card.UserHandle .Card.UserDid }}" />
+
<meta name="twitter:description" content="{{ or .Card.Profile.Description .Card.UserHandle .Card.UserDid }}" />
+
<meta name="twitter:image" content="{{ $avatarUrl }}" />
{{ end }}
{{ define "content" }}