From b0b7e56770f88f44baf22e736e171a42b612f098 Mon Sep 17 00:00:00 2001 From: Jessica Lawshe Date: Wed, 6 May 2020 09:58:01 -0500 Subject: [PATCH] Merge pull request #2803 from overleaf/jel-og-video Include og:video in metadata GitOrigin-RevId: ce49aad16eb29d22447f3206b7a1dc6accdf2933 --- services/web/app/views/_metadata.pug | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/services/web/app/views/_metadata.pug b/services/web/app/views/_metadata.pug index 2a5208074e..e57d8969cf 100644 --- a/services/web/app/views/_metadata.pug +++ b/services/web/app/views/_metadata.pug @@ -74,10 +74,12 @@ meta(name="twitter:card", content=metadata && metadata.twitterCardType ? metadat //- to do - add og:url -if (settings.social && settings.social.facebook && settings.social.facebook.appId) meta(property="fb:app_id", content=settings.social.facebook.appId) + -if (metadata && metadata.openGraphDescription) meta(property="og:description", content=metadata.openGraphDescription) -else meta(property="og:description", content=translate("site_description")) + -if (metadata && metadata.openGraphImage) //- from the CMS meta(property="og:image", content=metadata.openGraphImage.fields.file.url) @@ -87,11 +89,16 @@ meta(name="twitter:card", content=metadata && metadata.twitterCardType ? metadat -else //- the default image for ShareLaTeX meta(property="og:image", content='/touch-icon-192x192.png') + -if (metadata && metadata.openGraphType) meta(property="og:type", metadata.openGraphType) -else meta(property="og:type", content="website") +- if (metadata && metadata.openGraphVideo) + //- from the CMS + meta(property="og:video", content=metadata.openGraphVideo) + //- Viewport if metadata && metadata.viewport meta(name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes")