From 84855593186d37e26ecb5394e759479c88f184ee Mon Sep 17 00:00:00 2001 From: Kainoa Kanter <44733677+ThatOneCalculator@users.noreply.github.com> Date: Wed, 2 Feb 2022 07:51:41 -0800 Subject: [PATCH] =?UTF-8?q?Twitter=E3=81=AE=E5=9F=8B=E3=82=81=E8=BE=BC?= =?UTF-8?q?=E3=81=BF=E3=82=92=E4=BF=AE=E6=AD=A3=E3=81=97=E3=81=BE=E3=81=97?= =?UTF-8?q?=E3=81=9F=20[Fix=20Twitter=20embed]=20(#8193)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Fix Twitter embed * Update packages/backend/src/server/web/views/gallery-post.pug Co-authored-by: まっちゃとーにゅ <17376330+u1-liquid@users.noreply.github.com> * Update packages/backend/src/server/web/views/channel.pug Co-authored-by: まっちゃとーにゅ <17376330+u1-liquid@users.noreply.github.com> * Update packages/backend/src/server/web/views/base.pug Co-authored-by: まっちゃとーにゅ <17376330+u1-liquid@users.noreply.github.com> * Update packages/backend/src/server/web/views/base.pug Co-authored-by: まっちゃとーにゅ <17376330+u1-liquid@users.noreply.github.com> * Update packages/backend/src/server/web/views/clip.pug Co-authored-by: まっちゃとーにゅ <17376330+u1-liquid@users.noreply.github.com> * Update packages/backend/src/server/web/views/channel.pug Co-authored-by: まっちゃとーにゅ <17376330+u1-liquid@users.noreply.github.com> * Update packages/backend/src/server/web/views/note.pug Co-authored-by: まっちゃとーにゅ <17376330+u1-liquid@users.noreply.github.com> * Update packages/backend/src/server/web/views/gallery-post.pug Co-authored-by: まっちゃとーにゅ <17376330+u1-liquid@users.noreply.github.com> * Update packages/backend/src/server/web/views/page.pug Co-authored-by: まっちゃとーにゅ <17376330+u1-liquid@users.noreply.github.com> * Update packages/backend/src/server/web/views/user.pug Co-authored-by: まっちゃとーにゅ <17376330+u1-liquid@users.noreply.github.com> * Update packages/backend/src/server/web/views/page.pug Co-authored-by: rinsuki <428rinsuki+git@gmail.com> * Yay! * Update packages/backend/src/server/web/views/base.pug Co-authored-by: まっちゃとーにゅ <17376330+u1-liquid@users.noreply.github.com> * Update packages/backend/src/server/web/views/base.pug Co-authored-by: まっちゃとーにゅ <17376330+u1-liquid@users.noreply.github.com> * Update packages/backend/src/server/web/views/base.pug Co-authored-by: まっちゃとーにゅ <17376330+u1-liquid@users.noreply.github.com> * Update page.pug * Update channel.pug * Update gallery-post.pug * Update note.pug * Update page.pug * Update user.pug Co-authored-by: まっちゃとーにゅ <17376330+u1-liquid@users.noreply.github.com> Co-authored-by: rinsuki <428rinsuki+git@gmail.com> --- packages/backend/src/server/web/views/base.pug | 5 ++++- packages/backend/src/server/web/views/channel.pug | 3 --- packages/backend/src/server/web/views/clip.pug | 2 -- packages/backend/src/server/web/views/gallery-post.pug | 2 -- packages/backend/src/server/web/views/note.pug | 4 +--- packages/backend/src/server/web/views/page.pug | 2 -- packages/backend/src/server/web/views/user.pug | 2 -- 7 files changed, 5 insertions(+), 15 deletions(-) diff --git a/packages/backend/src/server/web/views/base.pug b/packages/backend/src/server/web/views/base.pug index 42c068c40..8e880bf04 100644 --- a/packages/backend/src/server/web/views/base.pug +++ b/packages/backend/src/server/web/views/base.pug @@ -21,6 +21,7 @@ html meta(name='referrer' content='origin') meta(name='theme-color' content='#86b300') meta(name='theme-color-orig' content='#86b300') + meta(property='twitter:card' content='summary') meta(property='og:site_name' content= instanceName || 'Misskey') meta(name='viewport' content='width=device-width, initial-scale=1') link(rel='icon' href= icon || '/favicon.ico') @@ -42,7 +43,9 @@ html block meta block og - meta(property='og:image' content=img) + meta(property='og:title' content= title || 'Misskey') + meta(property='og:description' content= desc || '✨🌎✨ A interplanetary communication platform ✨🚀✨') + meta(property='og:image' content= img) style include ../style.css diff --git a/packages/backend/src/server/web/views/channel.pug b/packages/backend/src/server/web/views/channel.pug index 273632f0e..486f0ecc4 100644 --- a/packages/backend/src/server/web/views/channel.pug +++ b/packages/backend/src/server/web/views/channel.pug @@ -16,6 +16,3 @@ block og meta(property='og:description' content= channel.description) meta(property='og:url' content= url) meta(property='og:image' content= channel.bannerUrl) - -block meta - meta(name='twitter:card' content='summary') diff --git a/packages/backend/src/server/web/views/clip.pug b/packages/backend/src/server/web/views/clip.pug index 8de53f19d..7a84d50f6 100644 --- a/packages/backend/src/server/web/views/clip.pug +++ b/packages/backend/src/server/web/views/clip.pug @@ -26,8 +26,6 @@ block meta meta(name='misskey:user-id' content=user.id) meta(name='misskey:clip-id' content=clip.id) - meta(name='twitter:card' content='summary') - // todo if user.twitter meta(name='twitter:creator' content=`@${user.twitter.screenName}`) diff --git a/packages/backend/src/server/web/views/gallery-post.pug b/packages/backend/src/server/web/views/gallery-post.pug index 95bbb2437..ca0663a48 100644 --- a/packages/backend/src/server/web/views/gallery-post.pug +++ b/packages/backend/src/server/web/views/gallery-post.pug @@ -25,8 +25,6 @@ block meta meta(name='misskey:user-username' content=user.username) meta(name='misskey:user-id' content=user.id) - meta(name='twitter:card' content='summary') - // todo if user.twitter meta(name='twitter:creator' content=`@${user.twitter.screenName}`) diff --git a/packages/backend/src/server/web/views/note.pug b/packages/backend/src/server/web/views/note.pug index fce91bdab..34b03f983 100644 --- a/packages/backend/src/server/web/views/note.pug +++ b/packages/backend/src/server/web/views/note.pug @@ -26,9 +26,7 @@ block meta meta(name='misskey:user-username' content=user.username) meta(name='misskey:user-id' content=user.id) meta(name='misskey:note-id' content=note.id) - - meta(name='twitter:card' content='summary') - + // todo if user.twitter meta(name='twitter:creator' content=`@${user.twitter.screenName}`) diff --git a/packages/backend/src/server/web/views/page.pug b/packages/backend/src/server/web/views/page.pug index cb9e1039e..b6c954802 100644 --- a/packages/backend/src/server/web/views/page.pug +++ b/packages/backend/src/server/web/views/page.pug @@ -26,8 +26,6 @@ block meta meta(name='misskey:user-id' content=user.id) meta(name='misskey:page-id' content=page.id) - meta(name='twitter:card' content='summary') - // todo if user.twitter meta(name='twitter:creator' content=`@${user.twitter.screenName}`) diff --git a/packages/backend/src/server/web/views/user.pug b/packages/backend/src/server/web/views/user.pug index 1a8a6b441..2adec0f88 100644 --- a/packages/backend/src/server/web/views/user.pug +++ b/packages/backend/src/server/web/views/user.pug @@ -25,8 +25,6 @@ block meta meta(name='misskey:user-username' content=user.username) meta(name='misskey:user-id' content=user.id) - meta(name='twitter:card' content='summary') - if profile.twitter meta(name='twitter:creator' content=`@${profile.twitter.screenName}`)