Add title and description to Opengraph data for Wrapstodon share page (#37188)

This commit is contained in:
Claire
2025-12-10 12:27:10 +01:00
committed by GitHub
parent 7b8a5d42f1
commit 6838497fe8
3 changed files with 9 additions and 0 deletions

View File

@@ -0,0 +1,4 @@
- description = t('wrapstodon.description', name: display_name(account))
%meta{ name: 'description', content: description }/
= opengraph 'og:description', description

View File

@@ -4,8 +4,12 @@
%meta{ name: 'robots', content: 'noindex, noarchive' }/
= opengraph 'og:site_name', site_title
= opengraph 'og:type', 'article'
= opengraph 'og:title', t('wrapstodon.title', name: display_name(@account), year: @generated_annual_report.year)
= opengraph 'profile:username', acct(@account)[1..]
= render 'og_description', account: @account
= vite_typescript_tag 'wrapstodon.tsx', crossorigin: 'anonymous'
- content_for :html_classes, 'theme-dark'

View File

@@ -2187,4 +2187,5 @@ en:
otp_required: To use security keys please enable two-factor authentication first.
registered_on: Registered on %{date}
wrapstodon:
description: See how %{name} used Mastodon this year!
title: Wrapstodon %{year} for %{name}