@fifthbell/brokaw 0.1.68 → 0.1.70
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/cronkite-manifest.d.ts +205 -69
- package/dist/cronkite-manifest.js +288 -111
- package/dist/cronkite-manifest.json +1024 -125
- package/dist/instagram-image-template.d.ts +0 -1
- package/dist/instagram-image-template.js +0 -4
- package/dist/layouts.d.ts +1 -1
- package/dist/live-program-page/index.html +2 -2
- package/dist/live-program-page/live-program-manifest.json +6 -6
- package/dist/live-program-page/live-program.v0.1.70.css +3 -0
- package/dist/manifest-validation.d.ts +2 -2
- package/dist/manifest-validation.js +12 -16
- package/dist/outlet-config.d.ts +0 -1
- package/dist/outlet-config.js +0 -1
- package/dist/renderer.browser.js +12 -0
- package/dist/renderer.core.js +42 -258
- package/dist/renderer.d.ts +1 -1
- package/dist/renderer.js +1 -1
- package/dist/schemas/canonical-document.schema.json +30 -10
- package/dist/schemas/cronkite-manifest.schema.json +84 -450
- package/dist/schemas/social-image-input.schema.json +14 -0
- package/dist/search-copy.d.ts +65 -0
- package/dist/search-copy.js +65 -0
- package/dist/types/canonical-document-schema.generated.d.ts +48 -4
- package/dist/types/canonical-document-schema.generated.js +48 -4
- package/dist/types/canonical-document.generated.d.ts +14 -0
- package/dist/types/cronkite-manifest.generated.d.ts +101 -297
- package/package.json +2 -2
- package/src/partial-deps.json +221 -50
- package/src/styles/compiled.css +1 -1
- package/src/templates/partials/blocks/tiktok.hbs +1 -1
- package/src/templates/partials/blocks/x.hbs +4 -4
- package/src/templates/partials/components/article-main.hbs +1 -1
- package/src/templates/partials/components/body-block.hbs +31 -0
- package/src/templates/partials/components/breaking-news/live-updates-column.hbs +2 -2
- package/src/templates/partials/components/breaking-news.hbs +6 -8
- package/src/templates/partials/components/editorial-hero.hbs +2 -2
- package/src/templates/partials/components/home/landing.hbs +1 -1
- package/src/templates/partials/components/home/main.hbs +4 -1
- package/src/templates/partials/components/live-story/main.hbs +8 -18
- package/src/templates/partials/components/not-found/main.hbs +4 -4
- package/src/templates/partials/components/search/main.hbs +25 -15
- package/src/templates/partials/components/snack-meta-image-row.hbs +21 -0
- package/src/templates/partials/components/snack-meta-inline.hbs +43 -0
- package/src/templates/partials/components/snack-top-story.hbs +1 -0
- package/src/templates/partials/components/snack.hbs +3 -61
- package/src/templates/partials/components/spotlight-hero-slides.hbs +1 -0
- package/src/templates/partials/components/spotlight-hero.hbs +2 -2
- package/src/templates/partials/components/standalone-main.hbs +1 -1
- package/src/templates/partials/shell/doc-start-404.hbs +2 -4
- package/src/templates/partials/shell/doc-start-standard.hbs +9 -11
- package/src/templates/partials/shell/rum-loader.hbs +77 -0
- package/src/templates/templates/instagram-image.hbs +0 -2
- package/dist/live-program-page/live-program.v0.1.68.css +0 -3
- /package/dist/live-program-page/{live-program.v0.1.68.js → live-program.v0.1.70.js} +0 -0
package/dist/renderer.core.js
CHANGED
|
@@ -1,88 +1,9 @@
|
|
|
1
1
|
import Handlebars from 'handlebars';
|
|
2
2
|
import { layoutNames } from './layouts.js';
|
|
3
3
|
import { canonicalArticleSchema } from './types/canonical-article.js';
|
|
4
|
-
import { distributeHomepageArticles } from './homepage-distributor.js';
|
|
5
|
-
import { buildSofascoreAttackMomentumUrl, buildSofascoreMatchUrl } from './utils/sofascore.js';
|
|
6
|
-
import { renderRumLoader } from './rum.js';
|
|
7
4
|
let initialized = false;
|
|
8
5
|
const layoutCache = new Map();
|
|
9
|
-
let runtimeStyles = '';
|
|
10
6
|
const removedBlockTypes = new Set(['truthSocial', 'truthsocial', 'truth-social', 'truth_social']);
|
|
11
|
-
const siteTitlesByLanguage = {
|
|
12
|
-
en: 'fifthbell - Breaking News & Current Events',
|
|
13
|
-
es: 'fifthbell - Noticias de última hora y actualidad',
|
|
14
|
-
it: 'fifthbell - Ultime notizie e attualità'
|
|
15
|
-
};
|
|
16
|
-
function normalizePathInput(value) {
|
|
17
|
-
if (typeof value !== 'string')
|
|
18
|
-
return '';
|
|
19
|
-
const trimmed = value.trim();
|
|
20
|
-
if (!trimmed)
|
|
21
|
-
return '';
|
|
22
|
-
try {
|
|
23
|
-
if (/^https?:\/\//i.test(trimmed)) {
|
|
24
|
-
const parsed = new URL(trimmed);
|
|
25
|
-
const normalizedAbsolute = `/${(parsed.pathname || '').replace(/^\/+/, '')}`.replace(/\/{2,}/g, '/');
|
|
26
|
-
if (normalizedAbsolute !== '/' && normalizedAbsolute.endsWith('/')) {
|
|
27
|
-
return normalizedAbsolute.slice(0, -1);
|
|
28
|
-
}
|
|
29
|
-
return normalizedAbsolute || '/';
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
catch {
|
|
33
|
-
// Fall back to raw string normalization below.
|
|
34
|
-
}
|
|
35
|
-
const withoutQueryOrHash = trimmed.split('#')[0].split('?')[0];
|
|
36
|
-
const normalized = `/${withoutQueryOrHash.replace(/^\/+/, '')}`.replace(/\/{2,}/g, '/');
|
|
37
|
-
if (normalized !== '/' && normalized.endsWith('/')) {
|
|
38
|
-
return normalized.slice(0, -1);
|
|
39
|
-
}
|
|
40
|
-
return normalized;
|
|
41
|
-
}
|
|
42
|
-
function cleanPathSegment(value) {
|
|
43
|
-
if (typeof value !== 'string')
|
|
44
|
-
return '';
|
|
45
|
-
return value.trim().replace(/^\/+|\/+$/g, '');
|
|
46
|
-
}
|
|
47
|
-
function buildLocalePath(path, language) {
|
|
48
|
-
const normalizedLanguage = language === 'es' || language === 'it' ? language : 'en';
|
|
49
|
-
if (!path)
|
|
50
|
-
return normalizedLanguage === 'en' ? '/' : `/${normalizedLanguage}`;
|
|
51
|
-
const normalized = String(path).startsWith('/') ? String(path) : `/${path}`;
|
|
52
|
-
if (normalized.startsWith('/es/') || normalized.startsWith('/it/')) {
|
|
53
|
-
return normalized;
|
|
54
|
-
}
|
|
55
|
-
if (normalizedLanguage === 'en') {
|
|
56
|
-
return normalized;
|
|
57
|
-
}
|
|
58
|
-
return `/${normalizedLanguage}${normalized}`;
|
|
59
|
-
}
|
|
60
|
-
function resolveArticleUrl(input) {
|
|
61
|
-
const explicitUrl = normalizePathInput(input.url);
|
|
62
|
-
if (explicitUrl && explicitUrl !== '/') {
|
|
63
|
-
return buildLocalePath(explicitUrl, input.language);
|
|
64
|
-
}
|
|
65
|
-
const canonicalUrl = normalizePathInput(input.canonicalUrl);
|
|
66
|
-
if (canonicalUrl && canonicalUrl !== '/') {
|
|
67
|
-
return buildLocalePath(canonicalUrl, input.language);
|
|
68
|
-
}
|
|
69
|
-
const slugRaw = typeof input.slug === 'string' ? input.slug : '';
|
|
70
|
-
const normalizedSlugPath = normalizePathInput(slugRaw);
|
|
71
|
-
const slugSegments = normalizedSlugPath.split('/').filter(Boolean);
|
|
72
|
-
if (slugSegments.length > 1) {
|
|
73
|
-
return buildLocalePath(normalizedSlugPath, input.language);
|
|
74
|
-
}
|
|
75
|
-
const slugSegment = cleanPathSegment(slugRaw);
|
|
76
|
-
const categories = Array.isArray(input.categories) ? input.categories : [];
|
|
77
|
-
const primaryCategorySlug = cleanPathSegment(categories[0]?.slug) || cleanPathSegment(input.category?.slug);
|
|
78
|
-
if (slugSegment && primaryCategorySlug) {
|
|
79
|
-
return buildLocalePath(`/${primaryCategorySlug}/${slugSegment}`, input.language);
|
|
80
|
-
}
|
|
81
|
-
if (slugSegment) {
|
|
82
|
-
return buildLocalePath(`/${slugSegment}`, input.language);
|
|
83
|
-
}
|
|
84
|
-
return buildLocalePath('/', input.language);
|
|
85
|
-
}
|
|
86
7
|
function normalizeDocument(doc) {
|
|
87
8
|
const rawBody = doc.body;
|
|
88
9
|
if (!Array.isArray(rawBody))
|
|
@@ -105,187 +26,61 @@ function registerHelpers() {
|
|
|
105
26
|
return [];
|
|
106
27
|
return items.slice(start, end);
|
|
107
28
|
});
|
|
108
|
-
Handlebars.registerHelper('uppercase', (value) => String(value ?? '').
|
|
109
|
-
Handlebars.registerHelper('coalesce', (...args) =>
|
|
110
|
-
const values = args.slice(0, -1);
|
|
111
|
-
for (const value of values) {
|
|
112
|
-
if (value === null || value === undefined)
|
|
113
|
-
continue;
|
|
114
|
-
if (typeof value === 'string' && value.trim().length === 0)
|
|
115
|
-
continue;
|
|
116
|
-
if (Array.isArray(value) && value.length === 0)
|
|
117
|
-
continue;
|
|
118
|
-
return value;
|
|
119
|
-
}
|
|
120
|
-
return '';
|
|
121
|
-
});
|
|
122
|
-
Handlebars.registerHelper('articleUrl', (...args) => {
|
|
123
|
-
const options = args[args.length - 1];
|
|
124
|
-
const hash = options?.hash;
|
|
125
|
-
const root = options?.data?.root;
|
|
126
|
-
return resolveArticleUrl({
|
|
127
|
-
url: hash?.url,
|
|
128
|
-
canonicalUrl: hash?.canonicalUrl,
|
|
129
|
-
slug: hash?.slug,
|
|
130
|
-
categories: hash?.categories,
|
|
131
|
-
category: hash?.category,
|
|
132
|
-
language: hash?.language ?? root?.language
|
|
133
|
-
});
|
|
134
|
-
});
|
|
29
|
+
Handlebars.registerHelper('uppercase', (value) => String(value ?? '').toLocaleUpperCase('en-US'));
|
|
30
|
+
Handlebars.registerHelper('coalesce', (...args) => args.slice(0, -1).find((value) => value !== null && value !== undefined) ?? null);
|
|
135
31
|
Handlebars.registerHelper('formatDate', (isoString) => {
|
|
136
32
|
if (!isoString)
|
|
137
33
|
return '';
|
|
138
34
|
try {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
return date.toLocaleTimeString('en-US', {
|
|
144
|
-
hour: 'numeric',
|
|
145
|
-
minute: '2-digit',
|
|
146
|
-
hour12: true,
|
|
147
|
-
timeZone: 'America/New_York'
|
|
148
|
-
});
|
|
149
|
-
}
|
|
150
|
-
else {
|
|
151
|
-
return date.toLocaleDateString('en-US', {
|
|
152
|
-
year: 'numeric',
|
|
153
|
-
month: 'long',
|
|
154
|
-
day: 'numeric',
|
|
155
|
-
timeZone: 'America/New_York'
|
|
156
|
-
});
|
|
157
|
-
}
|
|
35
|
+
return new Intl.DateTimeFormat('en-US', {
|
|
36
|
+
dateStyle: 'long',
|
|
37
|
+
timeZone: 'America/New_York'
|
|
38
|
+
}).format(new Date(isoString));
|
|
158
39
|
}
|
|
159
40
|
catch {
|
|
160
41
|
return isoString;
|
|
161
42
|
}
|
|
162
43
|
});
|
|
163
|
-
Handlebars.registerHelper('
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
return '';
|
|
180
|
-
const buildEmbedUrl = (tweetId) => `https://platform.twitter.com/embed/Tweet.html?id=${tweetId}&dnt=true`;
|
|
181
|
-
const idFromRaw = url.match(/status\/(\d+)/)?.[1];
|
|
182
|
-
try {
|
|
183
|
-
const parsed = new URL(url);
|
|
184
|
-
const host = parsed.hostname.replace(/^www\./, '');
|
|
185
|
-
if (host === 'x.com' || host === 'twitter.com') {
|
|
186
|
-
const tweetId = parsed.pathname.match(/\/[^/]+\/status\/(\d+)/)?.[1];
|
|
187
|
-
if (tweetId)
|
|
188
|
-
return buildEmbedUrl(tweetId);
|
|
189
|
-
}
|
|
190
|
-
return idFromRaw ? buildEmbedUrl(idFromRaw) : '';
|
|
191
|
-
}
|
|
192
|
-
catch {
|
|
193
|
-
return idFromRaw ? buildEmbedUrl(idFromRaw) : '';
|
|
194
|
-
}
|
|
195
|
-
});
|
|
196
|
-
Handlebars.registerHelper('xTweetId', (url) => {
|
|
197
|
-
if (!url)
|
|
198
|
-
return '';
|
|
199
|
-
const idFromRaw = url.match(/status\/(\d+)/)?.[1];
|
|
200
|
-
if (idFromRaw)
|
|
201
|
-
return idFromRaw;
|
|
202
|
-
try {
|
|
203
|
-
const parsed = new URL(url);
|
|
204
|
-
const host = parsed.hostname.replace(/^www\./, '');
|
|
205
|
-
if (host === 'x.com' || host === 'twitter.com') {
|
|
206
|
-
return parsed.pathname.match(/\/[^/]+\/status\/(\d+)/)?.[1] ?? '';
|
|
44
|
+
Handlebars.registerHelper('embedUrl', (name, options) => {
|
|
45
|
+
const templates = {
|
|
46
|
+
'x-status': 'https://twitter.com/{username}/status/{id}',
|
|
47
|
+
'x-embed': 'https://platform.twitter.com/embed/Tweet.html?id={id}&dnt=true',
|
|
48
|
+
instagram: 'https://www.instagram.com/p/{shortcode}/embed/',
|
|
49
|
+
tiktok: 'https://www.tiktok.com/embed/v2/{id}',
|
|
50
|
+
'sofascore-widget': 'https://widgets.sofascore.com/embed/attackMomentum?id={id}&widgetTheme={widgetTheme}',
|
|
51
|
+
'sofascore-match': 'https://www.sofascore.com/football/match#id:{id}'
|
|
52
|
+
};
|
|
53
|
+
const template = typeof name === 'string' ? templates[name] : undefined;
|
|
54
|
+
if (!template)
|
|
55
|
+
throw new Error(`Unknown embed provider "${String(name)}"`);
|
|
56
|
+
return template.replace(/\{([A-Za-z][A-Za-z0-9]*)\}/g, (_token, parameter) => {
|
|
57
|
+
const value = options.hash[parameter];
|
|
58
|
+
if (value === undefined || value === null || value === '') {
|
|
59
|
+
throw new Error(`Embed provider "${String(name)}" requires parameter ${parameter}`);
|
|
207
60
|
}
|
|
208
|
-
return
|
|
209
|
-
}
|
|
210
|
-
catch {
|
|
211
|
-
return '';
|
|
212
|
-
}
|
|
213
|
-
});
|
|
214
|
-
Handlebars.registerHelper('instagramEmbedUrl', (url) => {
|
|
215
|
-
if (!url)
|
|
216
|
-
return '';
|
|
217
|
-
const normalized = url.endsWith('/') ? url : `${url}/`;
|
|
218
|
-
return `${normalized}embed/`;
|
|
219
|
-
});
|
|
220
|
-
Handlebars.registerHelper('tiktokEmbedUrl', (url) => {
|
|
221
|
-
if (!url)
|
|
222
|
-
return '';
|
|
223
|
-
const match = url.match(/\/video\/(\d+)/);
|
|
224
|
-
if (!match)
|
|
225
|
-
return url;
|
|
226
|
-
return `https://www.tiktok.com/embed/v2/${match[1]}`;
|
|
61
|
+
return encodeURIComponent(String(value));
|
|
62
|
+
});
|
|
227
63
|
});
|
|
228
|
-
Handlebars.registerHelper('sofascoreWidgetUrl', (id) => buildSofascoreAttackMomentumUrl(id));
|
|
229
|
-
Handlebars.registerHelper('sofascoreMatchUrl', (id) => buildSofascoreMatchUrl(id));
|
|
230
64
|
Handlebars.registerHelper('jsonString', (value) => {
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
65
|
+
const serialized = JSON.stringify(value);
|
|
66
|
+
if (serialized === undefined)
|
|
67
|
+
throw new Error('jsonString cannot serialize this value');
|
|
68
|
+
return new Handlebars.SafeString(serialized.replace(/[<>&\u2028\u2029]/g, (character) => `\\u${character.charCodeAt(0).toString(16).padStart(4, '0')}`));
|
|
234
69
|
});
|
|
235
|
-
|
|
236
|
-
Handlebars.registerHelper('resolveHeadTitle', (doc) => {
|
|
70
|
+
const socialImage = (doc) => {
|
|
237
71
|
if (!doc || typeof doc !== 'object')
|
|
238
|
-
return
|
|
239
|
-
const
|
|
240
|
-
if (
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
return 'Search | fifthbell';
|
|
251
|
-
}
|
|
252
|
-
if (page.layout === 'article-page') {
|
|
253
|
-
const baseTitle = page.title?.trim() || 'Article';
|
|
254
|
-
return `${baseTitle} | fifthbell`;
|
|
255
|
-
}
|
|
256
|
-
if (page.layout === '404') {
|
|
257
|
-
return '404 - Page Not Found | fifthbell';
|
|
258
|
-
}
|
|
259
|
-
if (page.layout === 'live-story') {
|
|
260
|
-
const baseTitle = page.title?.trim() || 'Live Story';
|
|
261
|
-
return `${baseTitle} | fifthbell`;
|
|
262
|
-
}
|
|
263
|
-
if (page.layout === 'link-in-bio') {
|
|
264
|
-
const baseTitle = page.title?.trim() || 'Top Stories';
|
|
265
|
-
return `${baseTitle} | fifthbell`;
|
|
266
|
-
}
|
|
267
|
-
const seoTitle = page.seo?.metaTitle?.trim();
|
|
268
|
-
if (seoTitle)
|
|
269
|
-
return seoTitle;
|
|
270
|
-
const baseTitle = page.title?.trim() || 'fifthbell';
|
|
271
|
-
return `${baseTitle} | fifthbell`;
|
|
272
|
-
});
|
|
273
|
-
Handlebars.registerHelper('socialImageUrl', (value) => {
|
|
274
|
-
if (typeof value !== 'string')
|
|
275
|
-
return '';
|
|
276
|
-
const raw = value.trim();
|
|
277
|
-
if (!raw)
|
|
278
|
-
return '';
|
|
279
|
-
const normalizePath = (pathname) => pathname.replace(/\.avif$/i, '.jpg');
|
|
280
|
-
try {
|
|
281
|
-
const parsed = new URL(raw);
|
|
282
|
-
parsed.pathname = normalizePath(parsed.pathname);
|
|
283
|
-
return parsed.toString();
|
|
284
|
-
}
|
|
285
|
-
catch {
|
|
286
|
-
// Support relative URLs in template data.
|
|
287
|
-
return normalizePath(raw);
|
|
288
|
-
}
|
|
72
|
+
return null;
|
|
73
|
+
const image = doc.seo?.socialImage;
|
|
74
|
+
if (!image || typeof image !== 'object' || Array.isArray(image))
|
|
75
|
+
return null;
|
|
76
|
+
const candidate = image;
|
|
77
|
+
return typeof candidate.url === 'string' && candidate.url.trim() ? candidate : null;
|
|
78
|
+
};
|
|
79
|
+
Handlebars.registerHelper('socialImageUrl', (doc) => socialImage(doc)?.url ?? null);
|
|
80
|
+
Handlebars.registerHelper('socialImageAlt', (doc) => {
|
|
81
|
+
const document = doc;
|
|
82
|
+
const image = socialImage(doc);
|
|
83
|
+
return typeof image?.alt === 'string' && image.alt.trim() ? image.alt : String(document.title ?? 'fifthbell');
|
|
289
84
|
});
|
|
290
85
|
}
|
|
291
86
|
function registerPartials(partials) {
|
|
@@ -327,7 +122,6 @@ export function initializeHandlebars(assets) {
|
|
|
327
122
|
registerHelpers();
|
|
328
123
|
registerPartials(assets.partials);
|
|
329
124
|
compileLayouts(assets.layouts);
|
|
330
|
-
runtimeStyles = assets.styles;
|
|
331
125
|
initialized = true;
|
|
332
126
|
}
|
|
333
127
|
export function renderWithAssets(doc, assets) {
|
|
@@ -343,15 +137,5 @@ export function renderWithAssets(doc, assets) {
|
|
|
343
137
|
if (!template) {
|
|
344
138
|
throw new Error(`Layout template missing for \"${parsed.layout}\"`);
|
|
345
139
|
}
|
|
346
|
-
|
|
347
|
-
// article slots so templates do not need to perform index arithmetic.
|
|
348
|
-
const docExtra = doc;
|
|
349
|
-
const showBreakingNews = parsed.layout === 'homepage' && Boolean(parsed.breakingNews) && docExtra['showBreakingNews'] !== false;
|
|
350
|
-
const homepageSlots = parsed.layout === 'homepage' ? distributeHomepageArticles(parsed.articles ?? [], new Date(), showBreakingNews) : undefined;
|
|
351
|
-
return template({
|
|
352
|
-
...parsed,
|
|
353
|
-
...(homepageSlots !== undefined ? { homepageSlots } : {}),
|
|
354
|
-
styles: runtimeStyles,
|
|
355
|
-
logoLink: parsed.language === 'en' ? '/' : `/${parsed.language}`
|
|
356
|
-
});
|
|
140
|
+
return template(parsed);
|
|
357
141
|
}
|
package/dist/renderer.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { render, liveProgramPageHtml, liveProgramPageAsset, liveProgramPageFiles, fontFiles } from './renderer.node.js';
|
|
2
2
|
export type { LiveProgramFileEntry, FontFileEntry } from './renderer.node.js';
|
|
3
3
|
export { liveProgramReleaseFiles } from './live-program-release.js';
|
|
4
|
-
export { buildInstagramImageHtml,
|
|
4
|
+
export { buildInstagramImageHtml, type InstagramImageTemplateParams } from './instagram-image-template.js';
|
|
5
5
|
export { outletConfig } from './outlet-config.js';
|
|
6
6
|
export { version } from './version.js';
|
|
7
7
|
export { cronkiteManifest } from './cronkite-manifest.js';
|
package/dist/renderer.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { render, liveProgramPageHtml, liveProgramPageAsset, liveProgramPageFiles, fontFiles } from './renderer.node.js';
|
|
2
2
|
export { liveProgramReleaseFiles } from './live-program-release.js';
|
|
3
|
-
export { buildInstagramImageHtml
|
|
3
|
+
export { buildInstagramImageHtml } from './instagram-image-template.js';
|
|
4
4
|
export { outletConfig } from './outlet-config.js';
|
|
5
5
|
export { version } from './version.js';
|
|
6
6
|
export { cronkiteManifest } from './cronkite-manifest.js';
|
|
@@ -247,9 +247,10 @@
|
|
|
247
247
|
"type": "object",
|
|
248
248
|
"properties": {
|
|
249
249
|
"type": { "type": "string", "const": "x" },
|
|
250
|
-
"url": { "type": "string", "format": "uri" }
|
|
250
|
+
"url": { "type": "string", "format": "uri" },
|
|
251
|
+
"tweetId": { "type": "string", "pattern": "^[0-9]+$" }
|
|
251
252
|
},
|
|
252
|
-
"required": ["type", "url"]
|
|
253
|
+
"required": ["type", "url", "tweetId"]
|
|
253
254
|
},
|
|
254
255
|
{
|
|
255
256
|
"type": "object",
|
|
@@ -263,9 +264,10 @@
|
|
|
263
264
|
"type": "object",
|
|
264
265
|
"properties": {
|
|
265
266
|
"type": { "type": "string", "const": "tiktok" },
|
|
266
|
-
"url": { "type": "string", "format": "uri" }
|
|
267
|
+
"url": { "type": "string", "format": "uri" },
|
|
268
|
+
"videoId": { "type": "string", "pattern": "^[0-9]+$" }
|
|
267
269
|
},
|
|
268
|
-
"required": ["type", "url"]
|
|
270
|
+
"required": ["type", "url", "videoId"]
|
|
269
271
|
},
|
|
270
272
|
{
|
|
271
273
|
"type": "object",
|
|
@@ -292,7 +294,15 @@
|
|
|
292
294
|
"properties": {
|
|
293
295
|
"metaTitle": { "type": "string" },
|
|
294
296
|
"metaDescription": { "type": "string" },
|
|
295
|
-
"ogImage": { "type": "string" }
|
|
297
|
+
"ogImage": { "type": "string" },
|
|
298
|
+
"socialImage": {
|
|
299
|
+
"type": "object",
|
|
300
|
+
"properties": {
|
|
301
|
+
"url": { "type": "string", "minLength": 1 },
|
|
302
|
+
"alt": { "type": "string", "minLength": 1 }
|
|
303
|
+
},
|
|
304
|
+
"required": ["url", "alt"]
|
|
305
|
+
}
|
|
296
306
|
}
|
|
297
307
|
},
|
|
298
308
|
"navigation": {
|
|
@@ -772,9 +782,10 @@
|
|
|
772
782
|
"type": "object",
|
|
773
783
|
"properties": {
|
|
774
784
|
"type": { "type": "string", "const": "x" },
|
|
775
|
-
"url": { "type": "string", "format": "uri" }
|
|
785
|
+
"url": { "type": "string", "format": "uri" },
|
|
786
|
+
"tweetId": { "type": "string", "pattern": "^[0-9]+$" }
|
|
776
787
|
},
|
|
777
|
-
"required": ["type", "url"]
|
|
788
|
+
"required": ["type", "url", "tweetId"]
|
|
778
789
|
},
|
|
779
790
|
{
|
|
780
791
|
"type": "object",
|
|
@@ -788,9 +799,10 @@
|
|
|
788
799
|
"type": "object",
|
|
789
800
|
"properties": {
|
|
790
801
|
"type": { "type": "string", "const": "tiktok" },
|
|
791
|
-
"url": { "type": "string", "format": "uri" }
|
|
802
|
+
"url": { "type": "string", "format": "uri" },
|
|
803
|
+
"videoId": { "type": "string", "pattern": "^[0-9]+$" }
|
|
792
804
|
},
|
|
793
|
-
"required": ["type", "url"]
|
|
805
|
+
"required": ["type", "url", "videoId"]
|
|
794
806
|
},
|
|
795
807
|
{
|
|
796
808
|
"type": "object",
|
|
@@ -817,7 +829,15 @@
|
|
|
817
829
|
"properties": {
|
|
818
830
|
"metaTitle": { "type": "string" },
|
|
819
831
|
"metaDescription": { "type": "string" },
|
|
820
|
-
"ogImage": { "type": "string" }
|
|
832
|
+
"ogImage": { "type": "string" },
|
|
833
|
+
"socialImage": {
|
|
834
|
+
"type": "object",
|
|
835
|
+
"properties": {
|
|
836
|
+
"url": { "type": "string", "minLength": 1 },
|
|
837
|
+
"alt": { "type": "string", "minLength": 1 }
|
|
838
|
+
},
|
|
839
|
+
"required": ["url", "alt"]
|
|
840
|
+
}
|
|
821
841
|
}
|
|
822
842
|
},
|
|
823
843
|
"navigation": {
|