1
0

_og.html.haml 797 B

1234567891011121314
  1. - thumbnail = @instance_presenter.thumbnail
  2. - description ||= strip_tags(@instance_presenter.site_short_description.presence || t('about.about_mastodon_html'))
  3. %meta{ name: 'description', content: description }/
  4. = opengraph 'og:site_name', t('about.hosted_on', domain: site_hostname)
  5. = opengraph 'og:url', url_for(only_path: false)
  6. = opengraph 'og:type', 'website'
  7. = opengraph 'og:title', @instance_presenter.site_title
  8. = opengraph 'og:description', description
  9. = opengraph 'og:image', full_asset_url(thumbnail&.file&.url || asset_pack_path('media/images/preview.jpg', protocol: :request))
  10. = opengraph 'og:image:width', thumbnail ? thumbnail.meta['width'] : '1200'
  11. = opengraph 'og:image:height', thumbnail ? thumbnail.meta['height'] : '630'
  12. = opengraph 'twitter:card', 'summary_large_image'