diff --git a/app/views/wrapstodon/_og_description.html.haml b/app/views/wrapstodon/_og_description.html.haml new file mode 100644 index 0000000000..7b6e04cb8e --- /dev/null +++ b/app/views/wrapstodon/_og_description.html.haml @@ -0,0 +1,4 @@ +- description = t('wrapstodon.description', name: display_name(account)) + +%meta{ name: 'description', content: description }/ += opengraph 'og:description', description diff --git a/app/views/wrapstodon/show.html.haml b/app/views/wrapstodon/show.html.haml index 4cb57011fd..cb1fd904b8 100644 --- a/app/views/wrapstodon/show.html.haml +++ b/app/views/wrapstodon/show.html.haml @@ -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' diff --git a/config/locales/en.yml b/config/locales/en.yml index 0c44a7c3bf..f2b6de3a77 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -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}