Skip to content

Commit 420f7c2

Browse files
authored
fix: rebrand remaining diVine → Divine in OG meta tags (#222)
Noticed diVine branding in iMessage link previews for untitled videos. Updated Fastly Compute and CF Pages edge functions to use Divine.
1 parent 39ca229 commit 420f7c2

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed

compute-js/src/index.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -771,8 +771,8 @@ async function handleSubdomainProfile(subdomain, url, request, originalHostname)
771771
const userScript = `<script>window.__DIVINE_USER__ = ${JSON.stringify(divineUser)};</script>`;
772772

773773
// Update OG tags for the profile
774-
const ogTitle = divineUser.displayName + ' on diVine';
775-
const ogDescription = divineUser.about || `Watch ${divineUser.displayName}'s videos on diVine`;
774+
const ogTitle = divineUser.displayName + ' on Divine';
775+
const ogDescription = divineUser.about || `Watch ${divineUser.displayName}'s videos on Divine`;
776776
const ogImage = divineUser.picture || 'https://divine.video/og.png';
777777
const ogUrl = `https://${subdomain}.${apexDomain}/`;
778778

@@ -982,15 +982,15 @@ async function fetchVideoMetadata(videoId) {
982982
description = content.trim();
983983
} else if (statsList.length > 0) {
984984
// Show engagement stats
985-
description = `${statsList.join(' • ')} on diVine`;
985+
description = `${statsList.join(' • ')} on Divine`;
986986
} else {
987-
description = 'Watch this short video on diVine';
987+
description = 'Watch this short video on Divine';
988988
}
989989

990990
console.log('Fetched video metadata - title:', title, 'thumbnail:', thumbnail);
991991

992992
return {
993-
title: title || 'Video on diVine',
993+
title: title || 'Video on Divine',
994994
description: description,
995995
thumbnail: thumbnail || 'https://divine.video/og.avif',
996996
authorName: getTag('author') || '',
@@ -1018,8 +1018,8 @@ async function handleVideoOgTags(request, videoId, url) {
10181018
}
10191019

10201020
// Default meta values if video not found
1021-
const title = videoMeta?.title || 'Video on diVine';
1022-
const description = videoMeta?.description || 'Watch this video on diVine - Short-form looping videos on Nostr';
1021+
const title = videoMeta?.title || 'Video on Divine';
1022+
const description = videoMeta?.description || 'Watch this video on Divine - Short-form looping videos on Nostr';
10231023
const thumbnail = videoMeta?.thumbnail || 'https://divine.video/og.avif';
10241024
const authorName = videoMeta?.authorName || '';
10251025
const videoUrl = `https://divine.video/video/${videoId}`;
@@ -1033,7 +1033,7 @@ async function handleVideoOgTags(request, videoId, url) {
10331033
<head>
10341034
<meta charset="UTF-8">
10351035
<meta name="viewport" content="width=device-width, initial-scale=1.0">
1036-
<title>${escapeHtml(title)} - diVine</title>
1036+
<title>${escapeHtml(title)} - Divine</title>
10371037
10381038
<!-- Open Graph Meta Tags -->
10391039
<meta property="og:type" content="video.other" />
@@ -1043,7 +1043,7 @@ async function handleVideoOgTags(request, videoId, url) {
10431043
<meta property="og:image:width" content="480" />
10441044
<meta property="og:image:height" content="480" />
10451045
<meta property="og:url" content="${escapeHtml(videoUrl)}" />
1046-
<meta property="og:site_name" content="diVine" />
1046+
<meta property="og:site_name" content="Divine" />
10471047
10481048
<!-- Twitter Card Meta Tags -->
10491049
<meta name="twitter:card" content="summary_large_image" />

functions/[[path]].test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@ import { onRequest } from './[[path]]';
55
const INDEX_HTML = `<!DOCTYPE html>
66
<html lang="en">
77
<head>
8-
<title>diVine Web - Short-form Looping Videos on Nostr</title>
8+
<title>Divine Web - Short-form Looping Videos on Nostr</title>
99
<meta name="description" content="Watch and share 6-second looping videos on the decentralized Nostr network." />
1010
<meta property="og:type" content="website" />
1111
<meta property="og:url" content="https://divine.video/" />
12-
<meta property="og:title" content="diVine Web - Short-form Looping Videos on Nostr" />
12+
<meta property="og:title" content="Divine Web - Short-form Looping Videos on Nostr" />
1313
<meta property="og:description" content="Watch and share 6-second looping videos on the decentralized Nostr network." />
1414
<meta property="og:image" content="https://divine.video/og.png" />
15-
<meta property="og:image:alt" content="diVine Web - Short-form looping videos on the Nostr network" />
15+
<meta property="og:image:alt" content="Divine Web - Short-form looping videos on the Nostr network" />
1616
<meta name="twitter:card" content="summary_large_image" />
17-
<meta name="twitter:title" content="diVine Web - Short-form Looping Videos on Nostr" />
17+
<meta name="twitter:title" content="Divine Web - Short-form Looping Videos on Nostr" />
1818
<meta name="twitter:description" content="Watch and share 6-second looping videos on the decentralized Nostr network." />
1919
<meta name="twitter:image" content="https://divine.video/og.png" />
2020
</head>
@@ -98,7 +98,7 @@ describe('functions/[[path]]', () => {
9898
const html = await response.text();
9999

100100
expect(response.status).toBe(200);
101-
expect(html).toContain(`<title>${'diVine Web - Short-form Looping Videos on Nostr'}</title>`);
101+
expect(html).toContain(`<title>${'Divine Web - Short-form Looping Videos on Nostr'}</title>`);
102102
expect(html).not.toContain('property="og:video"');
103103
});
104104
});

functions/[[path]].ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,13 +156,13 @@ async function fetchVideoMeta(url: URL): Promise<PageMeta | null> {
156156

157157
const title = getTagValue(payload.event.tags, 'title')
158158
|| getTagValue(payload.event.tags, 'alt')
159-
|| 'Video on diVine';
159+
|| 'Video on Divine';
160160
const authorName = payload.stats?.author_name;
161161
const description = truncateText(
162162
getTagValue(payload.event.tags, 'summary')
163163
|| payload.event.content
164164
|| getTagValue(payload.event.tags, 'alt')
165-
|| (authorName ? `Watch this video by ${authorName} on diVine` : 'Watch this video on diVine'),
165+
|| (authorName ? `Watch this video by ${authorName} on Divine` : 'Watch this video on Divine'),
166166
200
167167
);
168168
const media = parseImeta(payload.event.tags);

0 commit comments

Comments
 (0)