@fifthbell/brokaw 0.1.74 → 0.1.75
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 -0
- package/dist/cronkite-manifest.d.ts +8 -0
- package/dist/cronkite-manifest.js +8 -0
- package/dist/cronkite-manifest.json +9 -1
- package/dist/live-program-page/index.html +2 -2
- package/dist/live-program-page/live-program-manifest.json +4 -4
- package/dist/manifest-validation.d.ts +1 -0
- package/dist/manifest-validation.js +3 -1
- package/dist/outlet-config.d.ts +5 -0
- package/dist/outlet-config.js +5 -0
- package/dist/schemas/redirect-input.schema.json +31 -0
- package/dist/system-pages.js +2 -1
- package/package.json +2 -1
- package/src/templates/layouts/redirect.hbs +24 -0
- /package/dist/live-program-page/{live-program.v0.1.74.css → live-program.v0.1.75.css} +0 -0
- /package/dist/live-program-page/{live-program.v0.1.74.js → live-program.v0.1.75.js} +0 -0
package/README.md
CHANGED
|
@@ -45,6 +45,7 @@ When enabled, the shared standard and 404 shells collect only performance and fi
|
|
|
45
45
|
- `@fifthbell/brokaw/schemas/canonical-document.schema.json` -> canonical input contract
|
|
46
46
|
- `@fifthbell/brokaw/schemas/cronkite-manifest.schema.json` -> CLS manifest contract
|
|
47
47
|
- `@fifthbell/brokaw/schemas/feed-renderable-input.schema.json` -> CMS-owned feed renderable input boundary
|
|
48
|
+
- `@fifthbell/brokaw/schemas/redirect-input.schema.json` -> redirect page input: one active redirect intent (gaulatti/ariston#211)
|
|
48
49
|
- `@fifthbell/brokaw/schemas/live-program-release-input.schema.json` -> generic live-program release input
|
|
49
50
|
- `@fifthbell/brokaw/partial-deps.json` -> partial-to-layout dependency map
|
|
50
51
|
|
|
@@ -175,6 +175,14 @@ export declare const cronkiteManifest: {
|
|
|
175
175
|
inputSchema: string;
|
|
176
176
|
contentType: string;
|
|
177
177
|
};
|
|
178
|
+
readonly redirect: {
|
|
179
|
+
readonly template: {
|
|
180
|
+
readonly entry: "src/templates/layouts/redirect.hbs";
|
|
181
|
+
readonly partials: [];
|
|
182
|
+
};
|
|
183
|
+
readonly inputSchema: "dist/schemas/redirect-input.schema.json";
|
|
184
|
+
readonly contentType: "text/html; charset=utf-8";
|
|
185
|
+
};
|
|
178
186
|
readonly 'social-image': {
|
|
179
187
|
readonly template: {
|
|
180
188
|
readonly entry: "src/templates/templates/instagram-image.hbs";
|
|
@@ -234,6 +234,14 @@ export const cronkiteManifest = {
|
|
|
234
234
|
'link-in-bio': page('link-in-bio', []),
|
|
235
235
|
'media-page': page('media-page', [pagePartials[0], pagePartials[1], 'components/media/main', pagePartials[2], pagePartials[3]]),
|
|
236
236
|
'standalone-page': page('standalone-page', [pagePartials[0], pagePartials[1], 'components/standalone-main', pagePartials[2], pagePartials[3]]),
|
|
237
|
+
// A page that sends readers from a story's old address to its current one
|
|
238
|
+
// (fifthbell/cronkite#148). Its input is an active redirect intent, not a
|
|
239
|
+
// canonical document.
|
|
240
|
+
redirect: {
|
|
241
|
+
template: { entry: 'src/templates/layouts/redirect.hbs', partials: [] },
|
|
242
|
+
inputSchema: 'dist/schemas/redirect-input.schema.json',
|
|
243
|
+
contentType: 'text/html; charset=utf-8',
|
|
244
|
+
},
|
|
237
245
|
'social-image': {
|
|
238
246
|
template: { entry: 'src/templates/templates/instagram-image.hbs', partials: [] },
|
|
239
247
|
inputSchema: 'dist/schemas/social-image-input.schema.json',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"package": "@fifthbell/brokaw",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.75",
|
|
4
4
|
"templateRendering": {
|
|
5
5
|
"contract": "cronkite.templates",
|
|
6
6
|
"contractVersion": 1,
|
|
@@ -491,6 +491,14 @@
|
|
|
491
491
|
"inputSchema": "dist/schemas/canonical-document.schema.json",
|
|
492
492
|
"contentType": "text/html; charset=utf-8"
|
|
493
493
|
},
|
|
494
|
+
"redirect": {
|
|
495
|
+
"template": {
|
|
496
|
+
"entry": "src/templates/layouts/redirect.hbs",
|
|
497
|
+
"partials": []
|
|
498
|
+
},
|
|
499
|
+
"inputSchema": "dist/schemas/redirect-input.schema.json",
|
|
500
|
+
"contentType": "text/html; charset=utf-8"
|
|
501
|
+
},
|
|
494
502
|
"social-image": {
|
|
495
503
|
"template": {
|
|
496
504
|
"entry": "src/templates/templates/instagram-image.hbs",
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
|
6
6
|
<title>Live Program | fifthbell</title>
|
|
7
|
-
<script type="module" crossorigin src="./live-program.v0.1.
|
|
8
|
-
<link rel="stylesheet" crossorigin href="./live-program.v0.1.
|
|
7
|
+
<script type="module" crossorigin src="./live-program.v0.1.75.js"></script>
|
|
8
|
+
<link rel="stylesheet" crossorigin href="./live-program.v0.1.75.css">
|
|
9
9
|
</head>
|
|
10
10
|
<body>
|
|
11
11
|
<div id="root"></div>
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
]
|
|
46
46
|
},
|
|
47
47
|
"package": "@fifthbell/brokaw",
|
|
48
|
-
"bundleVersion": "0.1.
|
|
48
|
+
"bundleVersion": "0.1.75",
|
|
49
49
|
"schemaVersion": 1,
|
|
50
50
|
"statePath": "state",
|
|
51
51
|
"eventsPath": "events",
|
|
@@ -390,16 +390,16 @@
|
|
|
390
390
|
"key": "index.html",
|
|
391
391
|
"contentType": "text/html; charset=utf-8",
|
|
392
392
|
"bytes": 446,
|
|
393
|
-
"sha256": "
|
|
393
|
+
"sha256": "596f6dc940d4948170fb991d9a59668f84121478408cdfaf043c0b85832beda9"
|
|
394
394
|
},
|
|
395
395
|
{
|
|
396
|
-
"key": "live-program.v0.1.
|
|
396
|
+
"key": "live-program.v0.1.75.css",
|
|
397
397
|
"contentType": "text/css; charset=utf-8",
|
|
398
398
|
"bytes": 77876,
|
|
399
399
|
"sha256": "1a2d8bafa07010ec5017874261af1a2c87191e5e93599051227beb904901a3d6"
|
|
400
400
|
},
|
|
401
401
|
{
|
|
402
|
-
"key": "live-program.v0.1.
|
|
402
|
+
"key": "live-program.v0.1.75.js",
|
|
403
403
|
"contentType": "application/javascript; charset=utf-8",
|
|
404
404
|
"bytes": 296100,
|
|
405
405
|
"sha256": "da30127b17e88c759d42aaffae75f438a6cfc880461e6625943c8728c0ca3f6b"
|
|
@@ -7,4 +7,5 @@ export type ManifestAlignmentSources = {
|
|
|
7
7
|
packageVersion: string;
|
|
8
8
|
exportedVersion: string;
|
|
9
9
|
};
|
|
10
|
+
export declare const NON_PAGE_RENDERABLES: ReadonlySet<string>;
|
|
10
11
|
export declare function assertManifestAlignment(manifest: CronkiteDeclarativeTemplateManifest, sources: ManifestAlignmentSources): void;
|
|
@@ -3,9 +3,11 @@ function assertSameOrderedValues(label, manifestValues, sourceValues) {
|
|
|
3
3
|
throw new Error(`${label} drift: manifest=${JSON.stringify(manifestValues)} source=${JSON.stringify(sourceValues)}`);
|
|
4
4
|
}
|
|
5
5
|
}
|
|
6
|
+
export const NON_PAGE_RENDERABLES = new Set(['redirect', 'social-image']);
|
|
6
7
|
export function assertManifestAlignment(manifest, sources) {
|
|
7
8
|
const rendering = manifest.templateRendering;
|
|
8
|
-
|
|
9
|
+
// Renderables whose input is not a canonical document have no page layout.
|
|
10
|
+
const declaredLayouts = Object.keys(rendering.renderables).filter((name) => !NON_PAGE_RENDERABLES.has(name));
|
|
9
11
|
assertSameOrderedValues('layout', declaredLayouts, sources.layouts);
|
|
10
12
|
assertSameOrderedValues('language', rendering.helperConfig.supportedLanguages, sources.languages);
|
|
11
13
|
if (manifest.package !== sources.packageName || manifest.version !== sources.packageVersion || manifest.version !== sources.exportedVersion) {
|
package/dist/outlet-config.d.ts
CHANGED
|
@@ -26,3 +26,8 @@ export declare const outletConfig: {
|
|
|
26
26
|
readonly socialImageExport: "buildInstagramImageHtml";
|
|
27
27
|
readonly hashtagServiceBaseUrl: "http://192.168.0.99:8000";
|
|
28
28
|
};
|
|
29
|
+
/**
|
|
30
|
+
* The public address of a site route: the builder pages and the redirect page
|
|
31
|
+
* share. The route is a path that starts with one slash.
|
|
32
|
+
*/
|
|
33
|
+
export declare const pageUrl: (route: string) => string;
|
package/dist/outlet-config.js
CHANGED
|
@@ -26,3 +26,8 @@ export const outletConfig = {
|
|
|
26
26
|
socialImageExport: 'buildInstagramImageHtml',
|
|
27
27
|
hashtagServiceBaseUrl: 'http://192.168.0.99:8000'
|
|
28
28
|
};
|
|
29
|
+
/**
|
|
30
|
+
* The public address of a site route: the builder pages and the redirect page
|
|
31
|
+
* share. The route is a path that starts with one slash.
|
|
32
|
+
*/
|
|
33
|
+
export const pageUrl = (route) => `${outletConfig.publicSiteUrl}${route}`;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://fifthbell.com/schemas/redirect-input-v1.schema.json",
|
|
4
|
+
"title": "Fifthbell redirect page input",
|
|
5
|
+
"description": "An active redirect intent as Ariston records it (gaulatti/ariston#211). The page is written at fromKey and sends the reader to toRoute on the public site. Only an active intent renders: a retired one (route_reclaimed, target_withdrawn) is refused so no redirect is written. Routes are site paths, never URLs. Keys Brokaw does not know are ignored.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["reason", "language", "fromRoute", "fromKey", "toRoute", "toKey", "status"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"reason": { "enum": ["combined", "route_moved"] },
|
|
10
|
+
"language": { "enum": ["en", "es", "it"] },
|
|
11
|
+
"fromRoute": { "$ref": "#/$defs/route" },
|
|
12
|
+
"fromKey": { "$ref": "#/$defs/pageKey" },
|
|
13
|
+
"toRoute": { "$ref": "#/$defs/route" },
|
|
14
|
+
"toKey": { "$ref": "#/$defs/pageKey" },
|
|
15
|
+
"status": { "const": "active" },
|
|
16
|
+
"retiredReason": { "const": null }
|
|
17
|
+
},
|
|
18
|
+
"$defs": {
|
|
19
|
+
"route": {
|
|
20
|
+
"description": "An article route: an optional es/it prefix, then lowercase ASCII segments. It always starts with one slash, so it can only add a path to the site origin.",
|
|
21
|
+
"type": "string",
|
|
22
|
+
"maxLength": 512,
|
|
23
|
+
"pattern": "^(?:/(?:es|it))?(?:/[a-z0-9]+(?:-[a-z0-9]+)*){1,2}$"
|
|
24
|
+
},
|
|
25
|
+
"pageKey": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"maxLength": 600,
|
|
28
|
+
"pattern": "^html/(?:(?:es|it)/)?[a-z0-9]+(?:-[a-z0-9]+)*(?:/[a-z0-9]+(?:-[a-z0-9]+)*)?/index\\.html$"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
package/dist/system-pages.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { pageUrl } from './outlet-config.js';
|
|
1
2
|
export const systemDocument = (layout, language, slug, title, excerpt, extra = {}) => ({
|
|
2
3
|
id: `system-${layout}-${language}`,
|
|
3
4
|
slug,
|
|
4
|
-
canonicalUrl:
|
|
5
|
+
canonicalUrl: pageUrl(slug),
|
|
5
6
|
contentVersion: '2026-09-21T00:00:00.000Z',
|
|
6
7
|
publishedAt: '2026-09-21T00:00:00.000Z',
|
|
7
8
|
updatedAt: '2026-09-21T00:00:00.000Z',
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fifthbell/brokaw",
|
|
3
3
|
"description": "Server-side Handlebars renderer and templates for fifthbell pages.",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.75",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "fifthbell",
|
|
7
7
|
"repository": {
|
|
@@ -40,6 +40,7 @@
|
|
|
40
40
|
"./schemas/canonical-document.schema.json": "./dist/schemas/canonical-document.schema.json",
|
|
41
41
|
"./schemas/cronkite-manifest.schema.json": "./dist/schemas/cronkite-manifest.schema.json",
|
|
42
42
|
"./schemas/feed-renderable-input.schema.json": "./dist/schemas/feed-renderable-input.schema.json",
|
|
43
|
+
"./schemas/redirect-input.schema.json": "./dist/schemas/redirect-input.schema.json",
|
|
43
44
|
"./schemas/live-program-release-input.schema.json": "./dist/schemas/live-program-release-input.schema.json",
|
|
44
45
|
"./video": "./dist/video/index.js",
|
|
45
46
|
"./components/live-program": {
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{{!--
|
|
2
|
+
Redirect page for a story that left its address (fifthbell/cronkite#148). It is
|
|
3
|
+
written at the old page key because the static origin does not honour object
|
|
4
|
+
redirect metadata. It sends the reader to the current story at once, tells
|
|
5
|
+
crawlers where the story lives now and keeps itself out of the index. The
|
|
6
|
+
target is the public site origin plus the intent's route only; the input
|
|
7
|
+
schema allows only path routes, and each context escapes it: HTML attributes
|
|
8
|
+
through Handlebars, the script through jsonString. If an edge 301 answers
|
|
9
|
+
first, this page is simply never served.
|
|
10
|
+
--}}
|
|
11
|
+
<!doctype html>
|
|
12
|
+
<html lang='{{language}}'>
|
|
13
|
+
<head>
|
|
14
|
+
<meta charset='utf-8' />
|
|
15
|
+
<meta name='robots' content='noindex' />
|
|
16
|
+
<meta http-equiv='refresh' content='0; url=https://fifthbell.com{{toRoute}}' />
|
|
17
|
+
<link rel='canonical' href='https://fifthbell.com{{toRoute}}' />
|
|
18
|
+
<title>fifthbell</title>
|
|
19
|
+
<script>window.location.replace('https://fifthbell.com' + {{{jsonString toRoute}}});</script>
|
|
20
|
+
</head>
|
|
21
|
+
<body>
|
|
22
|
+
<p><a href='https://fifthbell.com{{toRoute}}'>{{#if (eq language 'es')}}Ir a la noticia{{else if (eq language 'it')}}Vai alla notizia{{else}}Go to the story{{/if}}</a></p>
|
|
23
|
+
</body>
|
|
24
|
+
</html>
|
|
File without changes
|
|
File without changes
|