Merge pull request #8382 from Budibase/feature/meta-tag

adding opengraph metatags for better shareable links
This commit is contained in:
Martin McKeaveney 2022-10-31 10:36:50 +00:00 committed by GitHub
commit 19a515ffbd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 19 additions and 0 deletions

View File

@ -671,9 +671,15 @@ has@^1.0.3:
function-bind "^1.1.1"
html5-qrcode@^2.2.1:
<<<<<<< HEAD
version "2.2.4"
resolved "https://registry.yarnpkg.com/html5-qrcode/-/html5-qrcode-2.2.4.tgz#99e4b36fbd8fbc4956036cf3f21ea3e98c3463d1"
integrity sha512-X8wVVsHpNb35tl7KcoCGAboc6Nep2VyT3CIMjFvrfWrHbHTC0yYTjE+DhO/VcswY2MfHy1uB7b1G9+L13gM6dQ==
=======
version "2.2.3"
resolved "https://registry.yarnpkg.com/html5-qrcode/-/html5-qrcode-2.2.3.tgz#5acb826860365e7c7ab91e1e14528ea16a502e8a"
integrity sha512-9CtEz5FVT56T76entiQxyrASzBWl8Rm30NHiQH8T163Eml5LS14BoZlYel9igxbikOt7O8KhvrT3awN1Y2HMqw==
>>>>>>> 50f0a0509d79dcee7a0f12608054279d65662b10
htmlparser2@^6.0.0:
version "6.1.0"

View File

@ -111,6 +111,8 @@ export const serveApp = async function (ctx: any) {
const App = require("./templates/BudibaseApp.svelte").default
const plugins = enrichPluginURLs(appInfo.usedPlugins)
const { head, html, css } = App.render({
metaImage:
"https://res.cloudinary.com/daog6scxm/image/upload/v1666109324/meta-images/budibase-meta-image_uukc1m.png",
title: appInfo.name,
production: env.isProd(),
appId,

View File

@ -1,6 +1,8 @@
<script>
export let title = ""
export let favicon = ""
export let metaImage = ""
export let url = ""
export let clientLibPath
export let usedPlugins
@ -12,6 +14,15 @@
name="viewport"
content="width=device-width, initial-scale=1.0, viewport-fit=cover"
/>
<!-- Opengraph Meta Tags -->
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:site" content="@budibase" />
<meta name="twitter:image" content={metaImage} />
<meta name="twitter:title" content="{title} - built with Budibase" />
<meta property="og:site_name" content="Budibase" />
<meta property="og:title" content="{title} - built with Budibase" />
<meta property="og:type" content="website" />
<meta property="og:image" content={metaImage} />
<title>{title}</title>
<link rel="icon" type="image/png" href={favicon} />