闭社主体 forked from https://github.com/tootsuite/mastodon
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

10 lines
690 B

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