From faeac1aa2d173c15eb21b5c6a2e1c71de0af3fb6 Mon Sep 17 00:00:00 2001 From: Hatem Hosny Date: Wed, 1 Nov 2023 07:41:54 +0200 Subject: [PATCH] edit og title --- functions/index.ts | 6 ++++-- src/index.html | 8 ++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/functions/index.ts b/functions/index.ts index b401e1040..82bbbe81e 100644 --- a/functions/index.ts +++ b/functions/index.ts @@ -52,8 +52,10 @@ export const onRequest: PgFunction = async function (context) { `href="${url.origin}/oembed?url=${oembedUrl}&format=json"`, ) .replace( - /content="LiveCodes"/g, - `content="${!title || title === 'Untitled Project' ? 'LiveCodes' : title}"`, + /title" content="LiveCodes"/g, + `title" content="${ + !title || title === 'Untitled Project' ? 'LiveCodes' : title + ' - LiveCodes' + }"`, ) .replace( /content="Code Playground That Just Works!"/g, diff --git a/src/index.html b/src/index.html index 05a8f5f48..c8a1a47ac 100644 --- a/src/index.html +++ b/src/index.html @@ -12,7 +12,7 @@ - + @@ -20,7 +20,7 @@ - + @@ -51,8 +51,8 @@ - - + +