@fifthbell/brokaw 0.1.76 → 0.1.77
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 +4 -0
- package/dist/cronkite-manifest.d.ts +32 -0
- package/dist/cronkite-manifest.js +28 -0
- package/dist/cronkite-manifest.json +33 -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.js +1 -1
- package/dist/schemas/feed-input.schema.json +60 -0
- package/dist/schemas/robots-input.schema.json +54 -0
- package/dist/schemas/sitemap-index-input.schema.json +66 -0
- package/dist/schemas/sitemap-input.schema.json +45 -0
- package/package.json +5 -1
- package/src/templates/layouts/feed.hbs +38 -0
- package/src/templates/layouts/robots.hbs +22 -0
- package/src/templates/layouts/sitemap-index.hbs +13 -0
- package/src/templates/layouts/sitemap.hbs +22 -0
- /package/dist/live-program-page/{live-program.v0.1.76.css → live-program.v0.1.77.css} +0 -0
- /package/dist/live-program-page/{live-program.v0.1.76.js → live-program.v0.1.77.js} +0 -0
package/README.md
CHANGED
|
@@ -46,6 +46,10 @@ When enabled, the shared standard and 404 shells collect only performance and fi
|
|
|
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
48
|
- `@fifthbell/brokaw/schemas/redirect-input.schema.json` -> redirect page input: one active redirect intent (gaulatti/ariston#211)
|
|
49
|
+
- `@fifthbell/brokaw/schemas/robots-input.schema.json` -> robots.txt input: the site's rules and sitemap URLs (fifthbell/cronkite#156)
|
|
50
|
+
- `@fifthbell/brokaw/schemas/sitemap-input.schema.json` -> sitemap file input: story URLs with real lastmod (fifthbell/cronkite#155)
|
|
51
|
+
- `@fifthbell/brokaw/schemas/sitemap-index-input.schema.json` -> sitemap index input: the sitemap files with their lastmod (fifthbell/cronkite#155)
|
|
52
|
+
- `@fifthbell/brokaw/schemas/feed-input.schema.json` -> Atom feed input: the latest released stories of one language (fifthbell/cronkite#157)
|
|
49
53
|
- `@fifthbell/brokaw/schemas/live-program-release-input.schema.json` -> generic live-program release input
|
|
50
54
|
- `@fifthbell/brokaw/partial-deps.json` -> partial-to-layout dependency map
|
|
51
55
|
|
|
@@ -183,6 +183,38 @@ export declare const cronkiteManifest: {
|
|
|
183
183
|
readonly inputSchema: "dist/schemas/redirect-input.schema.json";
|
|
184
184
|
readonly contentType: "text/html; charset=utf-8";
|
|
185
185
|
};
|
|
186
|
+
readonly robots: {
|
|
187
|
+
readonly template: {
|
|
188
|
+
readonly entry: "src/templates/layouts/robots.hbs";
|
|
189
|
+
readonly partials: [];
|
|
190
|
+
};
|
|
191
|
+
readonly inputSchema: "dist/schemas/robots-input.schema.json";
|
|
192
|
+
readonly contentType: "text/plain; charset=utf-8";
|
|
193
|
+
};
|
|
194
|
+
readonly sitemap: {
|
|
195
|
+
readonly template: {
|
|
196
|
+
readonly entry: "src/templates/layouts/sitemap.hbs";
|
|
197
|
+
readonly partials: [];
|
|
198
|
+
};
|
|
199
|
+
readonly inputSchema: "dist/schemas/sitemap-input.schema.json";
|
|
200
|
+
readonly contentType: "text/xml; charset=utf-8";
|
|
201
|
+
};
|
|
202
|
+
readonly 'sitemap-index': {
|
|
203
|
+
readonly template: {
|
|
204
|
+
readonly entry: "src/templates/layouts/sitemap-index.hbs";
|
|
205
|
+
readonly partials: [];
|
|
206
|
+
};
|
|
207
|
+
readonly inputSchema: "dist/schemas/sitemap-index-input.schema.json";
|
|
208
|
+
readonly contentType: "text/xml; charset=utf-8";
|
|
209
|
+
};
|
|
210
|
+
readonly feed: {
|
|
211
|
+
readonly template: {
|
|
212
|
+
readonly entry: "src/templates/layouts/feed.hbs";
|
|
213
|
+
readonly partials: [];
|
|
214
|
+
};
|
|
215
|
+
readonly inputSchema: "dist/schemas/feed-input.schema.json";
|
|
216
|
+
readonly contentType: "text/xml; charset=utf-8";
|
|
217
|
+
};
|
|
186
218
|
readonly 'social-image': {
|
|
187
219
|
readonly template: {
|
|
188
220
|
readonly entry: "src/templates/templates/instagram-image.hbs";
|
|
@@ -240,6 +240,34 @@ export const cronkiteManifest = {
|
|
|
240
240
|
inputSchema: 'dist/schemas/redirect-input.schema.json',
|
|
241
241
|
contentType: 'text/html; charset=utf-8',
|
|
242
242
|
},
|
|
243
|
+
// robots.txt for the site (fifthbell/cronkite#156). Its input is the CMS's
|
|
244
|
+
// rule set, not a canonical document.
|
|
245
|
+
robots: {
|
|
246
|
+
template: { entry: 'src/templates/layouts/robots.hbs', partials: [] },
|
|
247
|
+
inputSchema: 'dist/schemas/robots-input.schema.json',
|
|
248
|
+
contentType: 'text/plain; charset=utf-8',
|
|
249
|
+
},
|
|
250
|
+
// The sitemap files of the site (fifthbell/cronkite#155): one file of URLs
|
|
251
|
+
// and the index of those files. Their input is the CMS's story set, not a
|
|
252
|
+
// canonical document.
|
|
253
|
+
sitemap: {
|
|
254
|
+
template: { entry: 'src/templates/layouts/sitemap.hbs', partials: [] },
|
|
255
|
+
inputSchema: 'dist/schemas/sitemap-input.schema.json',
|
|
256
|
+
contentType: 'text/xml; charset=utf-8',
|
|
257
|
+
},
|
|
258
|
+
'sitemap-index': {
|
|
259
|
+
template: { entry: 'src/templates/layouts/sitemap-index.hbs', partials: [] },
|
|
260
|
+
inputSchema: 'dist/schemas/sitemap-index-input.schema.json',
|
|
261
|
+
contentType: 'text/xml; charset=utf-8',
|
|
262
|
+
},
|
|
263
|
+
// The Atom feed of the latest released stories of one language
|
|
264
|
+
// (fifthbell/cronkite#157). Its input is the CMS's list, not a canonical
|
|
265
|
+
// document. text/ is the manifest's rule for a text content type.
|
|
266
|
+
feed: {
|
|
267
|
+
template: { entry: 'src/templates/layouts/feed.hbs', partials: [] },
|
|
268
|
+
inputSchema: 'dist/schemas/feed-input.schema.json',
|
|
269
|
+
contentType: 'text/xml; charset=utf-8',
|
|
270
|
+
},
|
|
243
271
|
'social-image': {
|
|
244
272
|
template: { entry: 'src/templates/templates/instagram-image.hbs', partials: [] },
|
|
245
273
|
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.77",
|
|
4
4
|
"templateRendering": {
|
|
5
5
|
"contract": "cronkite.templates",
|
|
6
6
|
"contractVersion": 1,
|
|
@@ -499,6 +499,38 @@
|
|
|
499
499
|
"inputSchema": "dist/schemas/redirect-input.schema.json",
|
|
500
500
|
"contentType": "text/html; charset=utf-8"
|
|
501
501
|
},
|
|
502
|
+
"robots": {
|
|
503
|
+
"template": {
|
|
504
|
+
"entry": "src/templates/layouts/robots.hbs",
|
|
505
|
+
"partials": []
|
|
506
|
+
},
|
|
507
|
+
"inputSchema": "dist/schemas/robots-input.schema.json",
|
|
508
|
+
"contentType": "text/plain; charset=utf-8"
|
|
509
|
+
},
|
|
510
|
+
"sitemap": {
|
|
511
|
+
"template": {
|
|
512
|
+
"entry": "src/templates/layouts/sitemap.hbs",
|
|
513
|
+
"partials": []
|
|
514
|
+
},
|
|
515
|
+
"inputSchema": "dist/schemas/sitemap-input.schema.json",
|
|
516
|
+
"contentType": "text/xml; charset=utf-8"
|
|
517
|
+
},
|
|
518
|
+
"sitemap-index": {
|
|
519
|
+
"template": {
|
|
520
|
+
"entry": "src/templates/layouts/sitemap-index.hbs",
|
|
521
|
+
"partials": []
|
|
522
|
+
},
|
|
523
|
+
"inputSchema": "dist/schemas/sitemap-index-input.schema.json",
|
|
524
|
+
"contentType": "text/xml; charset=utf-8"
|
|
525
|
+
},
|
|
526
|
+
"feed": {
|
|
527
|
+
"template": {
|
|
528
|
+
"entry": "src/templates/layouts/feed.hbs",
|
|
529
|
+
"partials": []
|
|
530
|
+
},
|
|
531
|
+
"inputSchema": "dist/schemas/feed-input.schema.json",
|
|
532
|
+
"contentType": "text/xml; charset=utf-8"
|
|
533
|
+
},
|
|
502
534
|
"social-image": {
|
|
503
535
|
"template": {
|
|
504
536
|
"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.77.js"></script>
|
|
8
|
+
<link rel="stylesheet" crossorigin href="./live-program.v0.1.77.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.77",
|
|
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": "4f7266c5cc0e2f928d43dcc2edda3c8cfa35ec9941a11d4ba635064826f352d8"
|
|
394
394
|
},
|
|
395
395
|
{
|
|
396
|
-
"key": "live-program.v0.1.
|
|
396
|
+
"key": "live-program.v0.1.77.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.77.js",
|
|
403
403
|
"contentType": "application/javascript; charset=utf-8",
|
|
404
404
|
"bytes": 296100,
|
|
405
405
|
"sha256": "da30127b17e88c759d42aaffae75f438a6cfc880461e6625943c8728c0ca3f6b"
|
|
@@ -3,7 +3,7 @@ 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
|
+
export const NON_PAGE_RENDERABLES = new Set(['feed', 'redirect', 'robots', 'sitemap', 'sitemap-index', 'social-image']);
|
|
7
7
|
export function assertManifestAlignment(manifest, sources) {
|
|
8
8
|
const rendering = manifest.templateRendering;
|
|
9
9
|
// Renderables whose input is not a canonical document have no page layout.
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://fifthbell.com/schemas/feed-input-v1.schema.json",
|
|
4
|
+
"title": "Fifthbell Atom feed input",
|
|
5
|
+
"description": "The latest released stories of one language as the CMS sends them (fifthbell/cronkite#157): at most 50 entries, newest first as sent. The feed has one author, the publication's name. An entry's id is the story's canonical URL, so it changes if the story moves to another URL (accepted). summary and imageUrl are optional and never invented: an entry without them has no such element. Dates are RFC 3339 date-times with a time zone. Keys Brokaw does not know are ignored.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["status", "language", "title", "author", "homeUrl", "selfUrl", "updated", "entries"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"id": { "type": "string" },
|
|
10
|
+
"slug": { "type": "string" },
|
|
11
|
+
"layout": { "const": "feed", "description": "Optional: the publish request names the renderable. When present it must be this renderable's name. A producer whose gateway validates any document that has a layout as a canonical document leaves it out." },
|
|
12
|
+
"status": { "const": "published" },
|
|
13
|
+
"language": { "type": "string", "pattern": "^[a-z]{2,3}(?:-[A-Za-z0-9]{1,8})*$" },
|
|
14
|
+
"contentVersion": { "type": "string" },
|
|
15
|
+
"title": { "$ref": "#/$defs/text" },
|
|
16
|
+
"subtitle": { "$ref": "#/$defs/text" },
|
|
17
|
+
"author": { "$ref": "#/$defs/text", "description": "The publication's name, written as the feed's one atom:author (RFC 4287 section 4.1.1 requires an author on the feed or on every entry). Required, so the feed is always valid Atom." },
|
|
18
|
+
"homeUrl": { "$ref": "#/$defs/url" },
|
|
19
|
+
"selfUrl": { "$ref": "#/$defs/url" },
|
|
20
|
+
"updated": { "$ref": "#/$defs/dateTime" },
|
|
21
|
+
"entries": {
|
|
22
|
+
"type": "array",
|
|
23
|
+
"maxItems": 50,
|
|
24
|
+
"items": {
|
|
25
|
+
"type": "object",
|
|
26
|
+
"required": ["id", "title", "url", "published", "updated"],
|
|
27
|
+
"properties": {
|
|
28
|
+
"id": { "$ref": "#/$defs/url" },
|
|
29
|
+
"title": { "$ref": "#/$defs/text" },
|
|
30
|
+
"url": { "$ref": "#/$defs/url" },
|
|
31
|
+
"published": { "$ref": "#/$defs/dateTime" },
|
|
32
|
+
"updated": { "$ref": "#/$defs/dateTime" },
|
|
33
|
+
"summary": { "type": "string", "maxLength": 5000, "pattern": "^[^\\u0000-\\u0008\\u000b\\u000c\\u000e-\\u001f\\u007f]*$" },
|
|
34
|
+
"imageUrl": { "$ref": "#/$defs/url" }
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"$defs": {
|
|
40
|
+
"text": {
|
|
41
|
+
"description": "Non-empty text without control characters that XML does not allow.",
|
|
42
|
+
"type": "string",
|
|
43
|
+
"minLength": 1,
|
|
44
|
+
"maxLength": 1000,
|
|
45
|
+
"pattern": "^[^\\u0000-\\u0008\\u000b\\u000c\\u000e-\\u001f\\u007f]+$"
|
|
46
|
+
},
|
|
47
|
+
"url": {
|
|
48
|
+
"description": "An absolute https URL with no whitespace or control character, at most 2,048 characters.",
|
|
49
|
+
"type": "string",
|
|
50
|
+
"maxLength": 2048,
|
|
51
|
+
"pattern": "^https://[^\\s\\u0000-\\u001f\\u007f\\u2028\\u2029]+$"
|
|
52
|
+
},
|
|
53
|
+
"dateTime": {
|
|
54
|
+
"description": "An RFC 3339 date-time with a time zone.",
|
|
55
|
+
"type": "string",
|
|
56
|
+
"maxLength": 40,
|
|
57
|
+
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?(?:Z|[+-]\\d{2}:\\d{2})$"
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://fifthbell.com/schemas/robots-input-v1.schema.json",
|
|
4
|
+
"title": "Fifthbell robots.txt input",
|
|
5
|
+
"description": "The rules of one site's robots.txt as the CMS sends them (fifthbell/cronkite#156). At least one rule is required, and every rule needs at least one Allow or Disallow line: a document with none, or a group with neither, is refused, because an empty group allows everything and a missing rule set must never render as allow-all. Every value is one line of plain text with no control characters, so no value can add a directive. Keys Brokaw does not know are ignored.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["status", "rules", "sitemaps"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"id": { "type": "string" },
|
|
10
|
+
"slug": { "type": "string" },
|
|
11
|
+
"layout": { "const": "robots", "description": "Optional: the publish request names the renderable. When present it must be this renderable's name. A producer whose gateway validates any document that has a layout as a canonical document leaves it out." },
|
|
12
|
+
"status": { "const": "published" },
|
|
13
|
+
"language": { "type": "string" },
|
|
14
|
+
"contentVersion": { "type": "string" },
|
|
15
|
+
"rules": {
|
|
16
|
+
"type": "array",
|
|
17
|
+
"minItems": 1,
|
|
18
|
+
"maxItems": 100,
|
|
19
|
+
"items": {
|
|
20
|
+
"type": "object",
|
|
21
|
+
"required": ["userAgent"],
|
|
22
|
+
"anyOf": [
|
|
23
|
+
{ "required": ["allow"], "properties": { "allow": { "type": "array", "minItems": 1 } } },
|
|
24
|
+
{ "required": ["disallow"], "properties": { "disallow": { "type": "array", "minItems": 1 } } }
|
|
25
|
+
],
|
|
26
|
+
"properties": {
|
|
27
|
+
"userAgent": { "$ref": "#/$defs/line" },
|
|
28
|
+
"allow": { "type": "array", "maxItems": 500, "items": { "$ref": "#/$defs/line" } },
|
|
29
|
+
"disallow": { "type": "array", "maxItems": 500, "items": { "$ref": "#/$defs/line" } }
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"sitemaps": {
|
|
34
|
+
"type": "array",
|
|
35
|
+
"maxItems": 50,
|
|
36
|
+
"items": { "$ref": "#/$defs/sitemapUrl" }
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"$defs": {
|
|
40
|
+
"line": {
|
|
41
|
+
"description": "One line of text: not empty, no line break and no other control character.",
|
|
42
|
+
"type": "string",
|
|
43
|
+
"minLength": 1,
|
|
44
|
+
"maxLength": 512,
|
|
45
|
+
"pattern": "^[^\\u0000-\\u001f\\u007f\\u2028\\u2029]+$"
|
|
46
|
+
},
|
|
47
|
+
"sitemapUrl": {
|
|
48
|
+
"description": "An absolute https URL with no whitespace or control character.",
|
|
49
|
+
"type": "string",
|
|
50
|
+
"maxLength": 2048,
|
|
51
|
+
"pattern": "^https://[^\\s\\u0000-\\u001f\\u007f\\u2028\\u2029]+$"
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://fifthbell.com/schemas/sitemap-index-input-v1.schema.json",
|
|
4
|
+
"title": "Fifthbell sitemap index input",
|
|
5
|
+
"description": "The sitemap index as the CMS sends it (fifthbell/cronkite#155): the files that list the site's URLs, each with the time it last changed. At least one and at most 4,000 files: the most that can never pass the 50 MB uncompressed limit of one file, whatever the locs hold (the sitemaps.org limit is 50,000 files). Keys Brokaw does not know are ignored.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": [
|
|
8
|
+
"status",
|
|
9
|
+
"sitemaps"
|
|
10
|
+
],
|
|
11
|
+
"properties": {
|
|
12
|
+
"id": {
|
|
13
|
+
"type": "string"
|
|
14
|
+
},
|
|
15
|
+
"slug": {
|
|
16
|
+
"type": "string"
|
|
17
|
+
},
|
|
18
|
+
"layout": {
|
|
19
|
+
"const": "sitemap-index",
|
|
20
|
+
"description": "Optional: the publish request names the renderable. When present it must be this renderable's name. A producer whose gateway validates any document that has a layout as a canonical document leaves it out."
|
|
21
|
+
},
|
|
22
|
+
"status": {
|
|
23
|
+
"const": "published"
|
|
24
|
+
},
|
|
25
|
+
"language": {
|
|
26
|
+
"type": "string"
|
|
27
|
+
},
|
|
28
|
+
"contentVersion": {
|
|
29
|
+
"type": "string"
|
|
30
|
+
},
|
|
31
|
+
"sitemaps": {
|
|
32
|
+
"type": "array",
|
|
33
|
+
"minItems": 1,
|
|
34
|
+
"maxItems": 4000,
|
|
35
|
+
"items": {
|
|
36
|
+
"type": "object",
|
|
37
|
+
"required": [
|
|
38
|
+
"loc",
|
|
39
|
+
"lastmod"
|
|
40
|
+
],
|
|
41
|
+
"properties": {
|
|
42
|
+
"loc": {
|
|
43
|
+
"$ref": "#/$defs/url"
|
|
44
|
+
},
|
|
45
|
+
"lastmod": {
|
|
46
|
+
"$ref": "#/$defs/lastmod"
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"$defs": {
|
|
53
|
+
"url": {
|
|
54
|
+
"description": "An absolute https URL with no whitespace or control character, at most 2,048 characters (the sitemaps.org limit).",
|
|
55
|
+
"type": "string",
|
|
56
|
+
"maxLength": 2048,
|
|
57
|
+
"pattern": "^https://[^\\s\\u0000-\\u001f\\u007f\\u2028\\u2029]+$"
|
|
58
|
+
},
|
|
59
|
+
"lastmod": {
|
|
60
|
+
"description": "A W3C date (YYYY-MM-DD) or date-time with a time zone.",
|
|
61
|
+
"type": "string",
|
|
62
|
+
"maxLength": 40,
|
|
63
|
+
"pattern": "^\\d{4}-\\d{2}-\\d{2}(?:T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?(?:Z|[+-]\\d{2}:\\d{2}))?$"
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://fifthbell.com/schemas/sitemap-input-v1.schema.json",
|
|
4
|
+
"title": "Fifthbell sitemap input",
|
|
5
|
+
"description": "One sitemap file as the CMS sends it (fifthbell/cronkite#155): the story URLs of one month, or the site's pages. At least one entry and at most 4,000: the most that can never pass the sitemaps.org 50 MB (50,000,000 bytes) uncompressed limit, whatever the entries hold (a loc of 2,048 characters that Handlebars escapes to 6 bytes each, plus markup, is under 12,500 bytes an entry, and 4,000 of them are under 50,000,000). The sitemaps.org limit of 50,000 URLs is therefore not reachable in one file: the producer splits larger sets across files, and keeps the single host of every loc. Each loc is an absolute https URL and each lastmod the story's real updatedAt. Keys Brokaw does not know are ignored.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["status", "entries"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"id": { "type": "string" },
|
|
10
|
+
"slug": { "type": "string" },
|
|
11
|
+
"layout": { "const": "sitemap", "description": "Optional: the publish request names the renderable. When present it must be this renderable's name. A producer whose gateway validates any document that has a layout as a canonical document leaves it out." },
|
|
12
|
+
"status": { "const": "published" },
|
|
13
|
+
"language": { "type": "string" },
|
|
14
|
+
"contentVersion": { "type": "string" },
|
|
15
|
+
"entries": {
|
|
16
|
+
"type": "array",
|
|
17
|
+
"minItems": 1,
|
|
18
|
+
"maxItems": 4000,
|
|
19
|
+
"items": {
|
|
20
|
+
"type": "object",
|
|
21
|
+
"required": ["loc", "lastmod"],
|
|
22
|
+
"properties": {
|
|
23
|
+
"loc": { "$ref": "#/$defs/url" },
|
|
24
|
+
"lastmod": { "$ref": "#/$defs/lastmod" },
|
|
25
|
+
"changefreq": { "enum": ["always", "hourly", "daily", "weekly", "monthly", "yearly", "never"] },
|
|
26
|
+
"priority": { "type": "number", "minimum": 0, "maximum": 1 }
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"$defs": {
|
|
32
|
+
"url": {
|
|
33
|
+
"description": "An absolute https URL with no whitespace or control character, at most 2,048 characters (the sitemaps.org limit).",
|
|
34
|
+
"type": "string",
|
|
35
|
+
"maxLength": 2048,
|
|
36
|
+
"pattern": "^https://[^\\s\\u0000-\\u001f\\u007f\\u2028\\u2029]+$"
|
|
37
|
+
},
|
|
38
|
+
"lastmod": {
|
|
39
|
+
"description": "A W3C date (YYYY-MM-DD) or date-time with a time zone.",
|
|
40
|
+
"type": "string",
|
|
41
|
+
"maxLength": 40,
|
|
42
|
+
"pattern": "^\\d{4}-\\d{2}-\\d{2}(?:T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?(?:Z|[+-]\\d{2}:\\d{2}))?$"
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
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.77",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "fifthbell",
|
|
7
7
|
"repository": {
|
|
@@ -41,6 +41,10 @@
|
|
|
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
43
|
"./schemas/redirect-input.schema.json": "./dist/schemas/redirect-input.schema.json",
|
|
44
|
+
"./schemas/robots-input.schema.json": "./dist/schemas/robots-input.schema.json",
|
|
45
|
+
"./schemas/sitemap-index-input.schema.json": "./dist/schemas/sitemap-index-input.schema.json",
|
|
46
|
+
"./schemas/sitemap-input.schema.json": "./dist/schemas/sitemap-input.schema.json",
|
|
47
|
+
"./schemas/feed-input.schema.json": "./dist/schemas/feed-input.schema.json",
|
|
44
48
|
"./schemas/live-program-release-input.schema.json": "./dist/schemas/live-program-release-input.schema.json",
|
|
45
49
|
"./video": "./dist/video/index.js",
|
|
46
50
|
"./components/live-program": {
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{{!--
|
|
2
|
+
Atom 1.0 feed of the latest released stories of one language
|
|
3
|
+
(fifthbell/cronkite#157). Text is escaped as XML text: Handlebars turns & < >
|
|
4
|
+
and quotes into character references, which XML reads back as the same
|
|
5
|
+
characters. Nothing is invented: an entry without a summary or an image has no
|
|
6
|
+
such element. The feed's own id is its self URL; an entry's id is the story's
|
|
7
|
+
canonical URL, so it changes if the story moves (accepted). The feed carries one
|
|
8
|
+
author, the publication's name from the document (RFC 4287 section 4.1.1).
|
|
9
|
+
--}}
|
|
10
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
11
|
+
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="{{language}}">
|
|
12
|
+
<title>{{title}}</title>
|
|
13
|
+
{{#if subtitle}}
|
|
14
|
+
<subtitle>{{subtitle}}</subtitle>
|
|
15
|
+
{{/if}}
|
|
16
|
+
<link rel="alternate" type="text/html" href="{{homeUrl}}"/>
|
|
17
|
+
<link rel="self" type="application/atom+xml" href="{{selfUrl}}"/>
|
|
18
|
+
<id>{{selfUrl}}</id>
|
|
19
|
+
<updated>{{updated}}</updated>
|
|
20
|
+
<author>
|
|
21
|
+
<name>{{author}}</name>
|
|
22
|
+
</author>
|
|
23
|
+
{{#each entries}}
|
|
24
|
+
<entry>
|
|
25
|
+
<title>{{title}}</title>
|
|
26
|
+
<link rel="alternate" type="text/html" href="{{url}}"/>
|
|
27
|
+
<id>{{id}}</id>
|
|
28
|
+
<published>{{published}}</published>
|
|
29
|
+
<updated>{{updated}}</updated>
|
|
30
|
+
{{#if summary}}
|
|
31
|
+
<summary>{{summary}}</summary>
|
|
32
|
+
{{/if}}
|
|
33
|
+
{{#if imageUrl}}
|
|
34
|
+
<link rel="enclosure" href="{{imageUrl}}"/>
|
|
35
|
+
{{/if}}
|
|
36
|
+
</entry>
|
|
37
|
+
{{/each}}
|
|
38
|
+
</feed>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{{!--
|
|
2
|
+
robots.txt (fifthbell/cronkite#156). Plain text, no HTML escaping: every value is
|
|
3
|
+
a single line by the input schema (no control characters), so no value can add a
|
|
4
|
+
directive. One group per rule in the given order, Allow lines before Disallow
|
|
5
|
+
lines, then one Sitemap line per URL. The input schema requires at least one
|
|
6
|
+
rule and every rule at least one Allow or Disallow line, so a document with no
|
|
7
|
+
rules, or a group with neither, is refused instead of rendering an empty file
|
|
8
|
+
or group that would allow everything.
|
|
9
|
+
--}}
|
|
10
|
+
{{#each rules}}
|
|
11
|
+
User-agent: {{{userAgent}}}
|
|
12
|
+
{{#each allow}}
|
|
13
|
+
Allow: {{{this}}}
|
|
14
|
+
{{/each}}
|
|
15
|
+
{{#each disallow}}
|
|
16
|
+
Disallow: {{{this}}}
|
|
17
|
+
{{/each}}
|
|
18
|
+
|
|
19
|
+
{{/each}}
|
|
20
|
+
{{#each sitemaps}}
|
|
21
|
+
Sitemap: {{{this}}}
|
|
22
|
+
{{/each}}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{{!--
|
|
2
|
+
Sitemap index (fifthbell/cronkite#155): one <sitemap> per file, in the given
|
|
3
|
+
order. Text is escaped as for the sitemap file itself.
|
|
4
|
+
--}}
|
|
5
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
6
|
+
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
|
7
|
+
{{#each sitemaps}}
|
|
8
|
+
<sitemap>
|
|
9
|
+
<loc>{{loc}}</loc>
|
|
10
|
+
<lastmod>{{lastmod}}</lastmod>
|
|
11
|
+
</sitemap>
|
|
12
|
+
{{/each}}
|
|
13
|
+
</sitemapindex>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{{!--
|
|
2
|
+
Sitemap file (fifthbell/cronkite#155): one <url> per entry, in the given order.
|
|
3
|
+
Values are XML text: Handlebars' escaping turns & < > and quotes into character
|
|
4
|
+
references, which XML reads back as the same characters, so a URL with & in it
|
|
5
|
+
stays valid. The input schema keeps each loc an absolute https URL without
|
|
6
|
+
whitespace or control characters and each lastmod a W3C date or date-time.
|
|
7
|
+
--}}
|
|
8
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
9
|
+
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
|
10
|
+
{{#each entries}}
|
|
11
|
+
<url>
|
|
12
|
+
<loc>{{loc}}</loc>
|
|
13
|
+
<lastmod>{{lastmod}}</lastmod>
|
|
14
|
+
{{#if changefreq}}
|
|
15
|
+
<changefreq>{{changefreq}}</changefreq>
|
|
16
|
+
{{/if}}
|
|
17
|
+
{{#if priority includeZero=true}}
|
|
18
|
+
<priority>{{priority}}</priority>
|
|
19
|
+
{{/if}}
|
|
20
|
+
</url>
|
|
21
|
+
{{/each}}
|
|
22
|
+
</urlset>
|
|
File without changes
|
|
File without changes
|