@fifthbell/brokaw 0.1.74 → 0.1.76
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 -5
- package/dist/cronkite-manifest.js +19 -16
- package/dist/cronkite-manifest.json +9 -170
- 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.76.css} +0 -0
- /package/dist/live-program-page/{live-program.v0.1.74.js → live-program.v0.1.76.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";
|
|
@@ -206,11 +214,6 @@ export declare const cronkiteManifest: {
|
|
|
206
214
|
readonly contentType: "text/html; charset=utf-8";
|
|
207
215
|
readonly cacheControl: "public, max-age=0, must-revalidate";
|
|
208
216
|
readonly variants: [SystemVariant, ...SystemVariant[]];
|
|
209
|
-
}, {
|
|
210
|
-
readonly renderable: "search-page";
|
|
211
|
-
readonly contentType: "text/html; charset=utf-8";
|
|
212
|
-
readonly cacheControl: "public, max-age=0, must-revalidate";
|
|
213
|
-
readonly variants: [SystemVariant, ...SystemVariant[]];
|
|
214
217
|
}, {
|
|
215
218
|
readonly renderable: "media-page";
|
|
216
219
|
readonly contentType: "text/html; charset=utf-8";
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { searchCopyByLanguage } from './search-copy.js';
|
|
2
1
|
import { version } from './version.js';
|
|
3
2
|
import { mediathekSystemPage, systemDocument } from './system-pages.js';
|
|
4
3
|
const pagePartials = [
|
|
@@ -86,24 +85,23 @@ const page = (layout, dependencies) => ({
|
|
|
86
85
|
const localizedSystemCopy = {
|
|
87
86
|
en: {
|
|
88
87
|
notFound: ['Page Not Found', 'The page you are looking for does not exist.', 'Go to Homepage', 'Or explore our categories:'],
|
|
89
|
-
search: ['Search', 'Search stories from Fifthbell.'],
|
|
90
88
|
},
|
|
91
89
|
es: {
|
|
92
90
|
notFound: ['Página no encontrada', 'La página que buscas no existe.', 'Ir al inicio', 'O explora nuestras categorías:'],
|
|
93
|
-
search: ['Buscar', 'Busca noticias de Fifthbell.'],
|
|
94
91
|
},
|
|
95
92
|
it: {
|
|
96
93
|
notFound: ['Pagina non trovata', 'La pagina che stai cercando non esiste.', 'Vai alla home page', 'Oppure esplora le nostre categorie:'],
|
|
97
|
-
search: ['Cerca', 'Cerca notizie Fifthbell.'],
|
|
98
94
|
},
|
|
99
95
|
};
|
|
100
|
-
|
|
96
|
+
// The 404 page in each language: the only localized system page, since the CMS
|
|
97
|
+
// publishes search itself (fifthbell/brokaw#38).
|
|
98
|
+
const notFoundVariants = (createExtra) => {
|
|
101
99
|
const variants = ['en', 'es', 'it'].map((language) => {
|
|
102
|
-
const localizedSegment = language === 'en' ?
|
|
103
|
-
const copy = localizedSystemCopy[language]
|
|
100
|
+
const localizedSegment = language === 'en' ? '/404' : `/${language}/404`;
|
|
101
|
+
const copy = localizedSystemCopy[language].notFound;
|
|
104
102
|
return {
|
|
105
|
-
key: language === 'en' ?
|
|
106
|
-
document: systemDocument(
|
|
103
|
+
key: language === 'en' ? 'html/404/index.html' : `html/${language}/404/index.html`,
|
|
104
|
+
document: systemDocument('404', language, localizedSegment, copy[0], copy[1], createExtra(language)),
|
|
107
105
|
};
|
|
108
106
|
});
|
|
109
107
|
return [variants[0], ...variants.slice(1)];
|
|
@@ -234,6 +232,14 @@ export const cronkiteManifest = {
|
|
|
234
232
|
'link-in-bio': page('link-in-bio', []),
|
|
235
233
|
'media-page': page('media-page', [pagePartials[0], pagePartials[1], 'components/media/main', pagePartials[2], pagePartials[3]]),
|
|
236
234
|
'standalone-page': page('standalone-page', [pagePartials[0], pagePartials[1], 'components/standalone-main', pagePartials[2], pagePartials[3]]),
|
|
235
|
+
// A page that sends readers from a story's old address to its current one
|
|
236
|
+
// (fifthbell/cronkite#148). Its input is an active redirect intent, not a
|
|
237
|
+
// canonical document.
|
|
238
|
+
redirect: {
|
|
239
|
+
template: { entry: 'src/templates/layouts/redirect.hbs', partials: [] },
|
|
240
|
+
inputSchema: 'dist/schemas/redirect-input.schema.json',
|
|
241
|
+
contentType: 'text/html; charset=utf-8',
|
|
242
|
+
},
|
|
237
243
|
'social-image': {
|
|
238
244
|
template: { entry: 'src/templates/templates/instagram-image.hbs', partials: [] },
|
|
239
245
|
inputSchema: 'dist/schemas/social-image-input.schema.json',
|
|
@@ -258,22 +264,19 @@ export const cronkiteManifest = {
|
|
|
258
264
|
cacheControl: immutable,
|
|
259
265
|
},
|
|
260
266
|
},
|
|
267
|
+
// Pages Cronkite generates without a CMS publish request (the manifest
|
|
268
|
+
// contract's definition). Search is not one: the CMS publishes it as a
|
|
269
|
+
// real search-page renderable (fifthbell/brokaw#38).
|
|
261
270
|
systemPages: [
|
|
262
271
|
{
|
|
263
272
|
renderable: '404',
|
|
264
273
|
contentType: 'text/html; charset=utf-8',
|
|
265
274
|
cacheControl: 'public, max-age=0, must-revalidate',
|
|
266
|
-
variants:
|
|
275
|
+
variants: notFoundVariants((language) => ({
|
|
267
276
|
homeLinkLabel: localizedSystemCopy[language].notFound[2],
|
|
268
277
|
categoriesLabel: localizedSystemCopy[language].notFound[3],
|
|
269
278
|
})),
|
|
270
279
|
},
|
|
271
|
-
{
|
|
272
|
-
renderable: 'search-page',
|
|
273
|
-
contentType: 'text/html; charset=utf-8',
|
|
274
|
-
cacheControl: 'public, max-age=0, must-revalidate',
|
|
275
|
-
variants: systemVariants('search-page', 'search', (language) => ({ searchCopy: searchCopyByLanguage[language] })),
|
|
276
|
-
},
|
|
277
280
|
mediathekSystemPage,
|
|
278
281
|
],
|
|
279
282
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"package": "@fifthbell/brokaw",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.76",
|
|
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",
|
|
@@ -870,175 +878,6 @@
|
|
|
870
878
|
}
|
|
871
879
|
]
|
|
872
880
|
},
|
|
873
|
-
{
|
|
874
|
-
"renderable": "search-page",
|
|
875
|
-
"contentType": "text/html; charset=utf-8",
|
|
876
|
-
"cacheControl": "public, max-age=0, must-revalidate",
|
|
877
|
-
"variants": [
|
|
878
|
-
{
|
|
879
|
-
"key": "html/search/index.html",
|
|
880
|
-
"document": {
|
|
881
|
-
"id": "system-search-page-en",
|
|
882
|
-
"slug": "/search",
|
|
883
|
-
"canonicalUrl": "https://fifthbell.com/search",
|
|
884
|
-
"contentVersion": "2026-09-21T00:00:00.000Z",
|
|
885
|
-
"publishedAt": "2026-09-21T00:00:00.000Z",
|
|
886
|
-
"updatedAt": "2026-09-21T00:00:00.000Z",
|
|
887
|
-
"status": "published",
|
|
888
|
-
"title": "Search",
|
|
889
|
-
"excerpt": "Search stories from Fifthbell.",
|
|
890
|
-
"language": "en",
|
|
891
|
-
"featured": false,
|
|
892
|
-
"body": [],
|
|
893
|
-
"layout": "search-page",
|
|
894
|
-
"authors": [
|
|
895
|
-
{
|
|
896
|
-
"name": "Fifthbell Newsroom",
|
|
897
|
-
"slug": "fifthbell-newsroom"
|
|
898
|
-
}
|
|
899
|
-
],
|
|
900
|
-
"categories": [],
|
|
901
|
-
"navigation": {
|
|
902
|
-
"categories": []
|
|
903
|
-
},
|
|
904
|
-
"logoLink": "/",
|
|
905
|
-
"seo": {
|
|
906
|
-
"metaTitle": "Search | fifthbell",
|
|
907
|
-
"metaDescription": "Search stories from Fifthbell."
|
|
908
|
-
},
|
|
909
|
-
"searchCopy": {
|
|
910
|
-
"eyebrow": "Search",
|
|
911
|
-
"heading": "Find Stories Fast",
|
|
912
|
-
"intro": "Search titles and excerpts across current-language coverage.",
|
|
913
|
-
"placeholder": "Search stories...",
|
|
914
|
-
"submit": "Search",
|
|
915
|
-
"emptyPrompt": "Start typing to search in this language.",
|
|
916
|
-
"emptyState": "No query yet.",
|
|
917
|
-
"noResults": "No matches for",
|
|
918
|
-
"tryAnother": "Try a different keyword.",
|
|
919
|
-
"resultSingular": "result",
|
|
920
|
-
"resultPlural": "results",
|
|
921
|
-
"forQuery": "for",
|
|
922
|
-
"page": "Page",
|
|
923
|
-
"of": "of",
|
|
924
|
-
"previous": "Previous",
|
|
925
|
-
"next": "Next",
|
|
926
|
-
"searching": "Searching...",
|
|
927
|
-
"unavailable": "Search is temporarily unavailable.",
|
|
928
|
-
"loadFailure": "We could not load the search index right now."
|
|
929
|
-
}
|
|
930
|
-
}
|
|
931
|
-
},
|
|
932
|
-
{
|
|
933
|
-
"key": "html/es/search/index.html",
|
|
934
|
-
"document": {
|
|
935
|
-
"id": "system-search-page-es",
|
|
936
|
-
"slug": "/es/search",
|
|
937
|
-
"canonicalUrl": "https://fifthbell.com/es/search",
|
|
938
|
-
"contentVersion": "2026-09-21T00:00:00.000Z",
|
|
939
|
-
"publishedAt": "2026-09-21T00:00:00.000Z",
|
|
940
|
-
"updatedAt": "2026-09-21T00:00:00.000Z",
|
|
941
|
-
"status": "published",
|
|
942
|
-
"title": "Buscar",
|
|
943
|
-
"excerpt": "Busca noticias de Fifthbell.",
|
|
944
|
-
"language": "es",
|
|
945
|
-
"featured": false,
|
|
946
|
-
"body": [],
|
|
947
|
-
"layout": "search-page",
|
|
948
|
-
"authors": [
|
|
949
|
-
{
|
|
950
|
-
"name": "Fifthbell Newsroom",
|
|
951
|
-
"slug": "fifthbell-newsroom"
|
|
952
|
-
}
|
|
953
|
-
],
|
|
954
|
-
"categories": [],
|
|
955
|
-
"navigation": {
|
|
956
|
-
"categories": []
|
|
957
|
-
},
|
|
958
|
-
"logoLink": "/es",
|
|
959
|
-
"seo": {
|
|
960
|
-
"metaTitle": "Buscar | fifthbell",
|
|
961
|
-
"metaDescription": "Busca noticias de Fifthbell."
|
|
962
|
-
},
|
|
963
|
-
"searchCopy": {
|
|
964
|
-
"eyebrow": "Buscar",
|
|
965
|
-
"heading": "Encuentra noticias rápido",
|
|
966
|
-
"intro": "Busca títulos y resúmenes en la cobertura de este idioma.",
|
|
967
|
-
"placeholder": "Buscar noticias...",
|
|
968
|
-
"submit": "Buscar",
|
|
969
|
-
"emptyPrompt": "Escribe para buscar en este idioma.",
|
|
970
|
-
"emptyState": "Aún no has escrito una búsqueda.",
|
|
971
|
-
"noResults": "No hay resultados para",
|
|
972
|
-
"tryAnother": "Prueba con otra palabra clave.",
|
|
973
|
-
"resultSingular": "resultado",
|
|
974
|
-
"resultPlural": "resultados",
|
|
975
|
-
"forQuery": "para",
|
|
976
|
-
"page": "Página",
|
|
977
|
-
"of": "de",
|
|
978
|
-
"previous": "Anterior",
|
|
979
|
-
"next": "Siguiente",
|
|
980
|
-
"searching": "Buscando...",
|
|
981
|
-
"unavailable": "La búsqueda no está disponible temporalmente.",
|
|
982
|
-
"loadFailure": "No pudimos cargar el índice de búsqueda en este momento."
|
|
983
|
-
}
|
|
984
|
-
}
|
|
985
|
-
},
|
|
986
|
-
{
|
|
987
|
-
"key": "html/it/search/index.html",
|
|
988
|
-
"document": {
|
|
989
|
-
"id": "system-search-page-it",
|
|
990
|
-
"slug": "/it/search",
|
|
991
|
-
"canonicalUrl": "https://fifthbell.com/it/search",
|
|
992
|
-
"contentVersion": "2026-09-21T00:00:00.000Z",
|
|
993
|
-
"publishedAt": "2026-09-21T00:00:00.000Z",
|
|
994
|
-
"updatedAt": "2026-09-21T00:00:00.000Z",
|
|
995
|
-
"status": "published",
|
|
996
|
-
"title": "Cerca",
|
|
997
|
-
"excerpt": "Cerca notizie Fifthbell.",
|
|
998
|
-
"language": "it",
|
|
999
|
-
"featured": false,
|
|
1000
|
-
"body": [],
|
|
1001
|
-
"layout": "search-page",
|
|
1002
|
-
"authors": [
|
|
1003
|
-
{
|
|
1004
|
-
"name": "Fifthbell Newsroom",
|
|
1005
|
-
"slug": "fifthbell-newsroom"
|
|
1006
|
-
}
|
|
1007
|
-
],
|
|
1008
|
-
"categories": [],
|
|
1009
|
-
"navigation": {
|
|
1010
|
-
"categories": []
|
|
1011
|
-
},
|
|
1012
|
-
"logoLink": "/it",
|
|
1013
|
-
"seo": {
|
|
1014
|
-
"metaTitle": "Cerca | fifthbell",
|
|
1015
|
-
"metaDescription": "Cerca notizie Fifthbell."
|
|
1016
|
-
},
|
|
1017
|
-
"searchCopy": {
|
|
1018
|
-
"eyebrow": "Cerca",
|
|
1019
|
-
"heading": "Trova rapidamente le notizie",
|
|
1020
|
-
"intro": "Cerca nei titoli e nei sommari della copertura in questa lingua.",
|
|
1021
|
-
"placeholder": "Cerca notizie...",
|
|
1022
|
-
"submit": "Cerca",
|
|
1023
|
-
"emptyPrompt": "Scrivi per cercare in questa lingua.",
|
|
1024
|
-
"emptyState": "Non hai ancora inserito una ricerca.",
|
|
1025
|
-
"noResults": "Nessun risultato per",
|
|
1026
|
-
"tryAnother": "Prova un'altra parola chiave.",
|
|
1027
|
-
"resultSingular": "risultato",
|
|
1028
|
-
"resultPlural": "risultati",
|
|
1029
|
-
"forQuery": "per",
|
|
1030
|
-
"page": "Pagina",
|
|
1031
|
-
"of": "di",
|
|
1032
|
-
"previous": "Precedente",
|
|
1033
|
-
"next": "Successivo",
|
|
1034
|
-
"searching": "Ricerca in corso...",
|
|
1035
|
-
"unavailable": "La ricerca è temporaneamente non disponibile.",
|
|
1036
|
-
"loadFailure": "Non è stato possibile caricare l’indice di ricerca."
|
|
1037
|
-
}
|
|
1038
|
-
}
|
|
1039
|
-
}
|
|
1040
|
-
]
|
|
1041
|
-
},
|
|
1042
881
|
{
|
|
1043
882
|
"renderable": "media-page",
|
|
1044
883
|
"contentType": "text/html; charset=utf-8",
|
|
@@ -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.76.js"></script>
|
|
8
|
+
<link rel="stylesheet" crossorigin href="./live-program.v0.1.76.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.76",
|
|
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": "b757139dfb0318ec158afe8b4d049bfec963c6cdf030ab6b2cf45d90370c7f9b"
|
|
394
394
|
},
|
|
395
395
|
{
|
|
396
|
-
"key": "live-program.v0.1.
|
|
396
|
+
"key": "live-program.v0.1.76.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.76.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.76",
|
|
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
|