Skip to content

Commit

Permalink
edit og title
Browse files Browse the repository at this point in the history
  • Loading branch information
hatemhosny committed Nov 1, 2023
1 parent 06af256 commit faeac1a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
6 changes: 4 additions & 2 deletions functions/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
8 changes: 4 additions & 4 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
<!-- Twitter -->
<meta property="twitter:title" content="LiveCodes" />
<meta property="twitter:description" content="Code Playground That Just Works!" />
<meta property="twitter:image" content="/livecodes/assets/images/livecodes-text-logo.png" />
<meta property="twitter:image" content="livecodes/assets/images/livecodes-text-logo.png" />
<meta property="twitter:url" content="https://livecodes.io/" />
<meta property="twitter:card" content="summary_large_image" />

<!-- Facebook -->
<meta property="og:title" content="LiveCodes" />
<meta property="og:description" content="Code Playground That Just Works!" />
<meta property="og:url" content="https://livecodes.io/" />
<meta property="og:image" content="/livecodes/assets/images/livecodes-text-logo.png" />
<meta property="og:image" content="livecodes/assets/images/livecodes-text-logo.png" />
<meta property="og:type" content="website" />

<!-- oEmbed -->
Expand Down Expand Up @@ -51,8 +51,8 @@
<link rel="icon" type="image/x-icon" href="favicon.ico" />
<link rel="manifest" href="livecodes/assets/site.webmanifest" />
<link rel="mask-icon" href="livecodes/assets/images/safari-pinned-tab.svg" color="#5bbad5" />
<meta name="apple-mobile-web-app-title" content="LiveCodes" />
<meta name="application-name" content="LiveCodes" />
<meta content="LiveCodes" name="apple-mobile-web-app-title" />
<meta content="LiveCodes" name="application-name" />
<meta name="msapplication-TileColor" content="#da532c" />
<meta name="msapplication-config" content="livecodes/assets/browserconfig.xml" />
<meta name="theme-color" content="#ffffff" />
Expand Down

0 comments on commit faeac1a

Please sign in to comment.