inlaycms 0.2.0 → 0.3.0

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.
Files changed (121) hide show
  1. package/README.md +330 -1
  2. package/assets/admin/admin.css +1 -1
  3. package/assets/admin/admin.js +1 -1
  4. package/assets/admin/editor.js +59 -44
  5. package/dist/adapters/admin/screens/redirects.js +12 -3
  6. package/dist/adapters/admin/views/layout.js +27 -7
  7. package/dist/adapters/cli/remote.js +9 -1
  8. package/dist/adapters/mcp/tools/redirects.js +16 -2
  9. package/dist/adapters/site/assets.d.ts +11 -0
  10. package/dist/adapters/site/assets.js +71 -0
  11. package/dist/adapters/site/cache.d.ts +2 -1
  12. package/dist/adapters/site/cache.js +6 -1
  13. package/dist/adapters/site/context.d.ts +6 -0
  14. package/dist/adapters/site/context.js +38 -13
  15. package/dist/adapters/site/head.d.ts +30 -7
  16. package/dist/adapters/site/head.js +145 -20
  17. package/dist/adapters/site/headers.d.ts +5 -0
  18. package/dist/adapters/site/headers.js +31 -0
  19. package/dist/adapters/site/plugin.d.ts +2 -0
  20. package/dist/adapters/site/plugin.js +32 -9
  21. package/dist/adapters/site/public.js +7 -24
  22. package/dist/adapters/site/render.d.ts +5 -0
  23. package/dist/adapters/site/render.js +23 -8
  24. package/dist/adapters/site/routes.d.ts +6 -0
  25. package/dist/adapters/site/routes.js +8 -3
  26. package/dist/adapters/site/seo.d.ts +20 -0
  27. package/dist/adapters/site/seo.js +45 -0
  28. package/dist/adapters/site/sitemap.d.ts +1 -1
  29. package/dist/adapters/site/sitemap.js +1 -1
  30. package/dist/config.js +3 -2
  31. package/dist/core/agent/format.js +1 -1
  32. package/dist/core/agent/schema.js +3 -0
  33. package/dist/core/boot.js +7 -0
  34. package/dist/core/check.js +6 -1
  35. package/dist/core/content/dry-run.d.ts +7 -6
  36. package/dist/core/content/dry-run.js +8 -8
  37. package/dist/core/content/publish.d.ts +1 -1
  38. package/dist/core/content/publish.js +5 -3
  39. package/dist/core/content/read.d.ts +3 -0
  40. package/dist/core/content/reader.js +3 -2
  41. package/dist/core/content/refs.js +1 -1
  42. package/dist/core/content/search.js +2 -2
  43. package/dist/core/content/shipped-images.d.ts +32 -0
  44. package/dist/core/content/shipped-images.js +62 -0
  45. package/dist/core/content/shipped-input.d.ts +9 -3
  46. package/dist/core/content/shipped-input.js +165 -28
  47. package/dist/core/content/shipped.js +8 -3
  48. package/dist/core/content/validate.js +7 -1
  49. package/dist/core/core.d.ts +5 -1
  50. package/dist/core/core.js +5 -4
  51. package/dist/core/db/connection.d.ts +6 -0
  52. package/dist/core/db/connection.js +13 -1
  53. package/dist/core/db/migrate.js +2 -0
  54. package/dist/core/db/migrations/0007_published_at.d.ts +3 -0
  55. package/dist/core/db/migrations/0007_published_at.js +16 -0
  56. package/dist/core/db/schema.d.ts +1 -0
  57. package/dist/core/export/export.js +3 -1
  58. package/dist/core/export/format.d.ts +8 -1
  59. package/dist/core/export/format.js +3 -2
  60. package/dist/core/export/read.js +7 -0
  61. package/dist/core/export/stage.d.ts +1 -1
  62. package/dist/core/export/stage.js +24 -1
  63. package/dist/core/fields/builtins.d.ts +28 -0
  64. package/dist/core/fields/builtins.js +103 -11
  65. package/dist/core/fields/define.d.ts +6 -0
  66. package/dist/core/fields/widgets.d.ts +7 -0
  67. package/dist/core/fields/widgets.js +76 -28
  68. package/dist/core/messages/en.d.ts +70 -6
  69. package/dist/core/messages/en.js +70 -6
  70. package/dist/core/redirects/collapse.d.ts +17 -1
  71. package/dist/core/redirects/collapse.js +19 -3
  72. package/dist/core/redirects/redirects.d.ts +13 -12
  73. package/dist/core/redirects/redirects.js +141 -53
  74. package/dist/core/redirects/rule.d.ts +25 -0
  75. package/dist/core/redirects/rule.js +55 -0
  76. package/dist/core/registry/define.d.ts +40 -0
  77. package/dist/core/registry/define.js +3 -0
  78. package/dist/core/registry/registry.d.ts +21 -0
  79. package/dist/core/registry/registry.js +114 -6
  80. package/dist/core/registry/render.d.ts +37 -1
  81. package/dist/core/registry/route.d.ts +4 -0
  82. package/dist/core/release/bundle.js +30 -5
  83. package/dist/core/release/manifest.d.ts +14 -0
  84. package/dist/core/release/manifest.js +42 -17
  85. package/dist/core/release/markdown-file.d.ts +21 -0
  86. package/dist/core/release/markdown-file.js +172 -0
  87. package/dist/core/release/pack.js +2 -2
  88. package/dist/core/release/read.js +4 -1
  89. package/dist/core/release/site-dir.d.ts +4 -0
  90. package/dist/core/release/site-dir.js +8 -0
  91. package/dist/core/report.d.ts +8 -2
  92. package/dist/core/richtext/html.d.ts +3 -1
  93. package/dist/core/richtext/html.js +16 -4
  94. package/dist/core/richtext/inline.d.ts +22 -0
  95. package/dist/core/richtext/inline.js +33 -0
  96. package/dist/core/richtext/markdown.d.ts +16 -1
  97. package/dist/core/richtext/markdown.js +137 -14
  98. package/dist/core/richtext/schema.d.ts +16 -4
  99. package/dist/core/richtext/schema.js +71 -1
  100. package/dist/core/site/live.d.ts +1 -0
  101. package/dist/core/site/live.js +1 -0
  102. package/dist/core/site/paths.d.ts +6 -0
  103. package/dist/core/site/paths.js +13 -0
  104. package/dist/core/site/resolve.d.ts +1 -1
  105. package/dist/core/site/resolve.js +119 -30
  106. package/dist/core/site/sitemap.d.ts +1 -1
  107. package/dist/core/site/sitemap.js +4 -0
  108. package/dist/core/types.d.ts +28 -3
  109. package/dist/host/app.d.ts +5 -0
  110. package/dist/host/app.js +8 -0
  111. package/dist/host/dev.js +3 -7
  112. package/dist/host/diff.d.ts +19 -1
  113. package/dist/host/diff.js +32 -2
  114. package/dist/index.d.ts +2 -2
  115. package/dist/markdown-modules.d.ts +8 -0
  116. package/dist/markdown-modules.js +1 -0
  117. package/dist/site.d.ts +8 -3
  118. package/dist/site.js +6 -0
  119. package/dist/testing.d.ts +22 -0
  120. package/dist/testing.js +155 -0
  121. package/package.json +6 -1
@@ -55,6 +55,8 @@ export declare const en: {
55
55
  readonly 'definition.adminActor': 'An admin route asked who is signed in, but it was registered outside the signed-in area. Register it through registerScreens.';
56
56
  readonly 'definition.jsxAttribute': 'The attribute name "{name}" isn\'t allowed in a template. Use letters, numbers and dashes only.';
57
57
  readonly 'config.renderMissing': 'The template "{name}" has no render function, so its pages can\'t be shown. Add a render function to the template.';
58
+ readonly 'config.headJsonLd': "A template added JSON-LD that can't be written as JSON.";
59
+ readonly 'config.headHref': 'A template added a link to "{href}", which isn\'t a safe address. Use a path on this site or an http or https URL.';
58
60
  readonly 'config.publicKey': "That isn't a public key. It should look like ed25519: followed by letters and digits (as printed by inlaycms keygen), but it was: {text}";
59
61
  readonly 'config.baseUrl': 'The baseUrl option "{value}" can\'t be used. It must be the full address of the site starting with https:// or http://, with nothing after the domain, such as https://example.com.';
60
62
  readonly 'config.secret': 'The secret option must be at least 32 characters long. Use a long random value and keep it private.';
@@ -167,12 +169,34 @@ export declare const en: {
167
169
  readonly 'definition.notFound': 'The site\'s notFound names "{name}", but it must be the name of a singleton with path: null whose template has a render function.';
168
170
  readonly 'definition.publicPath': 'The site\'s publicPaths lists "{path}", but every entry must be a path starting with /, such as /healthz.';
169
171
  readonly 'definition.secretName': 'The site\'s secrets list "{name}" more than once or in the wrong form. Each secret is listed once, in capital letters, digits and underscores starting with a letter, such as SLACK_WEBHOOK.';
172
+ readonly 'definition.headerName': 'The site\'s headers list "{name}", which is not allowed. List each header once, by a name made of letters, digits and hyphens, such as Permissions-Policy. Inlay sets Cache-Control, Content-Type, Set-Cookie, Location, ETag and Vary itself.';
173
+ readonly 'definition.headerValue': 'The site\'s header "{name}" has a value that is not allowed. Give it a single line of text, or false to leave Inlay\'s default out.';
170
174
  readonly 'definition.migrationName': 'The site\'s migrations use the name "{name}" more than once or leave it empty. Give each migration its own name, such as team-to-people.';
171
175
  readonly 'definition.routePath': 'The route path "{path}" must start with "/", have no empty or dot segments, no "/" at the end, and contain no ":", "*", "?", "#" or "%".';
172
176
  readonly 'definition.routeReserved': 'The route path "{path}" belongs to Inlay itself (the home page, the admin, sign-in, MCP, media, public files, the sitemap or robots.txt). Pick another path.';
173
177
  readonly 'definition.routeShadows': 'The route path "{path}" would hide pages of "{name}" in one of the site\'s languages. Pick a path no page uses.';
178
+ readonly 'definition.routeSitemap': 'The route {method} "{path}" has sitemap: true. Only GET routes can be listed in the sitemap.';
174
179
  readonly 'definition.routeDuplicate': 'Two routes handle {method} requests to "{path}". Keep one of them.';
175
180
  readonly 'definition.routeMethod': 'The route "{path}" uses the method {method}. Routes can only handle GET and POST.';
181
+ readonly 'definition.redirectFrom': 'The redirect from "{from}" can\'t be used. Write the old address as a path such as /old-page, with no "?" or "#", no repeated ":name", and not under Inlay\'s own paths or the default language\'s prefix.';
182
+ readonly 'definition.redirectTo': 'The redirect from "{from}" goes to "{to}", which can\'t be used. Point it at a path such as /about (without the default language\'s prefix) or a full https:// address without a user name.';
183
+ readonly 'definition.redirectParam': 'The redirect from "{from}" uses ":{name}" in its target, but the old address has no such part. Use only the ":name" parts of the old address.';
184
+ readonly 'definition.redirectUrlParam': 'The redirect from "{from}" uses ":{name}" in a full https:// address. Parts like ":{name}" are filled in only on paths of this site, so remove it from the address.';
185
+ readonly 'definition.redirectStatus': 'The redirect from "{from}" uses the status {status}. Redirects can only use 301 or 302.';
186
+ readonly 'definition.redirectDuplicate': 'The site redirects "{from}" more than once. Keep one of them.';
187
+ readonly 'definition.redirectRoute': 'The redirect from "{from}" would never run, because a GET route answers at that path. Remove the redirect or the route.';
188
+ readonly 'definition.seoTitleTemplate': 'The site\'s title template "{value}" must contain %s exactly once, where each page\'s title goes, such as "%s | My Site".';
189
+ readonly 'definition.seoImage': 'The site\'s default share image "{value}" must be a file under /public/, such as /public/share.png.';
190
+ readonly 'definition.seoDescription': "The site's default description must be text.";
191
+ readonly 'definition.seoDefaultsTwice': 'Search and sharing defaults appear in both {first} and {second}. Keep f.seoDefaults() in one global only.';
192
+ readonly 'definition.seoDefaultsPlace': '{field} uses f.seoDefaults(), which can only be a top-level field of a global.';
193
+ readonly 'definition.ogType': 'The template "{name}" has ogType "{value}". Use "website" or "article".';
194
+ readonly 'label.seoDefaults': 'Search and sharing defaults';
195
+ readonly 'label.seoDefaults.titleTemplate': 'Title template';
196
+ readonly 'label.seoDefaults.titleTemplateHelp': 'Put %s where the page\'s title goes, such as "%s | My Site". Pages with their own search title, and the home page, don\'t use it.';
197
+ readonly 'label.seoDefaults.description': 'Default description';
198
+ readonly 'label.seoDefaults.image': 'Default share image';
199
+ readonly 'issue.titleTemplate': '{field} must contain %s exactly once, where the page\'s title goes, such as "%s | My Site".';
176
200
  readonly 'label.seo': 'Search and sharing';
177
201
  readonly 'label.seo.title': 'Title';
178
202
  readonly 'label.seo.description': 'Description';
@@ -204,7 +228,13 @@ export declare const en: {
204
228
  readonly 'issue.shippedFileMissing': '{field} uses the file "{path}", which doesn\'t exist or can\'t be read.';
205
229
  readonly 'issue.shippedFileUnknown': '{field} uses the file "{path}", which isn\'t part of this release.';
206
230
  readonly 'issue.shippedFileInvalid': '{field}: {problem}';
207
- readonly 'issue.shippedRichTextImage': "{field}: Line {line}: shipped content can't include images in rich text, because there is no way to name their files there. Remove the image, or put it in an image field instead.";
231
+ readonly 'issue.shippedImageRemote': '{field}: Line {line}: the image "{src}" is on another website, and a release never downloads anything. Download it into the site\'s folder and name it by its path, such as images/chart.png.';
232
+ readonly 'issue.shippedImageRooted': '{field}: Line {line}: the image "{src}" starts with "/", which is an address on the site, not a file. Name the file by its path inside the site\'s folder, such as images/chart.png.';
233
+ readonly 'issue.shippedImageOutside': '{field}: Line {line}: the image "{src}" is outside the site\'s folder. Move it into the site\'s folder and name it from there.';
234
+ readonly 'issue.shippedImageMissing': '{field}: Line {line}: the image "{src}" doesn\'t exist or can\'t be read.';
235
+ readonly 'issue.shippedImageUnknown': '{field}: Line {line}: the image "{src}" isn\'t part of this release.';
236
+ readonly 'issue.shippedImageNotImage': '{field}: Line {line}: "{src}" isn\'t an image.';
237
+ readonly 'issue.shippedImageInvalid': '{field}: Line {line}: {problem}';
208
238
  readonly 'issue.shippedKeyUnknown': '{field} points to "{key}" in {type}, which isn\'t part of the shipped content. Add it to the shipped content, or remove the reference.';
209
239
  readonly 'error.shippedContent': 'The shipped content for {label} ({locale}) has problems. Fix the content in the site code and try again.';
210
240
  readonly 'error.shippedEntry': 'The shipped content for {label} "{key}" ({locale}) has problems. Fix the content in the site code and try again.';
@@ -233,10 +263,15 @@ export declare const en: {
233
263
  readonly 'error.checkFailed': 'Inlay can\'t go ahead until the site code and the database fit together. Fix the {count} {count|problem|problems} below and try again.\n{list}';
234
264
  readonly 'error.noDatabase': 'There is no database file at {path}.';
235
265
  readonly 'error.configMissing': 'There is no Inlay config file at {path}.';
266
+ readonly 'error.testSitePath': 'A test site fetches paths on the site, starting with / (such as /about), not "{path}".';
267
+ readonly 'error.testSiteBody': 'A test site can send a text or URLSearchParams body, nothing else.';
268
+ readonly 'error.testSiteClosed': 'This test site has been closed. Make a new one with createTestSite.';
236
269
  readonly 'error.packImport': "{file} imports {specifier}, which a release can't include. Site code imports Inlay from inlaycms/site (and the JSX runtime), and may use packages that can be bundled with it, but not Node's own modules or the rest of inlaycms. This check catches mistakes; what makes a release trusted is its signature.";
237
270
  readonly 'error.packForbidden': "{file} uses {what}, which a release can't include. Site code can't reach the server's process, load code by a computed name or run code from text. This check catches mistakes; what makes a release trusted is its signature.";
238
271
  readonly 'error.packBundle': "The site code couldn't be bundled into a release: {problem}";
239
272
  readonly 'error.packFile': 'The shipped content names the file {path}, but there is no file there.';
273
+ readonly 'error.markdownImageReference': "{file}, line {line}: this image is written as a reference ([alt][name]), which Inlay can't follow in a Markdown file. Write the image inline instead, such as ![A chart](images/chart.png).";
274
+ readonly 'error.markdownImageUnplaced': "{file}, line {line}: Inlay couldn't work out where this image's file is. Put the image on a line of its own, written simply, such as ![A chart](images/chart.png).";
240
275
  readonly 'error.releaseSignature': "This release isn't signed by a trusted key, so it wasn't opened.";
241
276
  readonly 'error.releaseInvalid': "This release file is damaged or wasn't made by inlaycms pack.";
242
277
  readonly 'error.releaseVersion': 'This release needs Inlay {need} or a later {series} version, but this server runs Inlay {version}.';
@@ -310,6 +345,11 @@ export declare const en: {
310
345
  readonly 'diff.release.migration': 'The migration function `{name}` will run.';
311
346
  readonly 'diff.release.routeAdded': 'Adds the route {method} {path}.';
312
347
  readonly 'diff.release.routeRemoved': 'Removes the route {method} {path}.';
348
+ readonly 'diff.release.routeSitemapAdded': 'Lists the route {path} in the sitemap.';
349
+ readonly 'diff.release.routeSitemapRemoved': 'No longer lists the route {path} in the sitemap.';
350
+ readonly 'diff.release.redirectAdded': 'Adds the redirect {from} to {to} ({status}).';
351
+ readonly 'diff.release.redirectRemoved': 'Removes the redirect {from} to {to}.';
352
+ readonly 'diff.release.redirectChanged': 'The redirect from {from} now goes to {to} ({status}).';
313
353
  readonly 'diff.release.secrets': 'Needs the {count|secret|secrets} {names} set on the server.';
314
354
  readonly 'error.previewUnavailable': "The preview of this release couldn't be started. Try again in a moment.";
315
355
  readonly 'error.previewNotStaged': "{name} isn't waiting to go live any more (it was made live or deleted), so it can't be previewed.";
@@ -387,16 +427,21 @@ export declare const en: {
387
427
  readonly 'shipped.pathTaken': 'The shipped {label} "{key}" ({locale}) asks for the path {path}, which is already taken, so it keeps its current path {kept}. Change the path in the shipped content or in the admin.';
388
428
  readonly 'shipped.pathDropped': 'The shipped {label} "{key}" ({locale}) asks for the path {path}, which is already taken, so it was saved without a page of its own. Give it a free path in the shipped content or in the admin.';
389
429
  readonly 'report.slugShadowed': '"{title}" ({locale}) has the slug "{slug}", but its page {path} is hidden by a page or path Inlay serves first. Editors can\'t save it until the slug changes.';
430
+ readonly 'report.redirectHidden': 'The redirect from {from} never fires: a published page now answers at that address. That is expected once the page has replaced the old URL, and you can remove the rule from the code when convenient.';
431
+ readonly 'report.redirectLoop': 'The redirect from {from} sends visitors round in a loop together with the other redirects, so the server skips it. Change its target or remove one of the rules.';
390
432
  readonly 'richtext.unsupported': "Line {line}: rich text can't contain {feature}. Remove it, or write it as normal text instead.";
391
433
  readonly 'richtext.notAllowed': "Line {line}: this field can't contain {feature}. Remove it, or write it as normal text instead.";
392
434
  readonly 'richtext.headingLevel': "Line {line}: this field can't contain a level {level} heading (one with {level} # signs). Use one of these levels instead: {levels}.";
393
435
  readonly 'richtext.headingContent': "Line {line}: headings can't contain {feature}. Move it to a paragraph below the heading.";
436
+ readonly 'richtext.tableNested': "Line {line}: tables can't go inside a list or a quote. Move the table out so it stands on its own.";
437
+ readonly 'richtext.tableCell': "Line {line}: table cells can't contain {feature}. Keep each cell to text, bold, italic and links.";
394
438
  readonly 'richtext.imageSource': 'Line {line}: images must come from the media library, not from another address ("{src}"). Upload the image to the media library and use that instead.';
395
439
  readonly 'richtext.linkUrl': 'Line {line}: the link address "{href}" can\'t be used. Links must start with https://, http://, mailto:, tel: or /, or point to a page of this site.';
396
440
  readonly 'richtext.title': "Line {line}: {feature} can't have a title (the text in quotes after the address). Remove the title.";
397
441
  readonly 'richtext.unusedDefinition': 'Line {line}: "{text}" sets a link address that no link uses, so it would be lost. Remove the line, or use the address in a link.';
398
442
  readonly 'richtext.tooDeep': 'Line {line}: quotes and lists are nested too deeply here. Use fewer levels.';
399
443
  readonly 'richtext.unreadable': "Line {line}: this text couldn't be turned into rich text. Check its formatting and try again.";
444
+ readonly 'richtext.inlineParagraphs': 'Line {line}: this field holds a single line of text. Join the lines into one, without a blank line between them.';
400
445
  readonly 'richtext.feature.heading': 'headings';
401
446
  readonly 'richtext.feature.bold': 'bold text';
402
447
  readonly 'richtext.feature.italic': 'italic text';
@@ -415,11 +460,14 @@ export declare const en: {
415
460
  readonly 'richtext.feature.other': 'this kind of formatting';
416
461
  readonly 'error.redirectInvalid': "This redirect can't be saved. Fix the problems listed and try again.";
417
462
  readonly 'error.redirectNotFound': "We couldn't find that redirect. It may already have been deleted.";
463
+ readonly 'error.redirectDeleteLoop': "This redirect can't be deleted: without it, visitors to \"{path}\" would be sent round in a loop and never reach a page. Change where the other redirects in that loop go first.";
418
464
  readonly 'label.redirect.from': 'Old address';
419
465
  readonly 'label.redirect.to': 'New address';
420
466
  readonly 'label.redirect.status': 'Redirect type';
421
467
  readonly 'issue.redirectFrom': '{field} "{path}" can\'t be used. It must be an address on this site that starts with "/", such as /old-page, without "?" or "#", and not one reserved by Inlay (such as /admin or /media).';
422
- readonly 'issue.redirectTo': '{field} "{path}" can\'t be used. It must be an address on this site that starts with "/", such as /new-page, without "?" or "#".';
468
+ readonly 'issue.redirectTo': '{field} "{path}" can\'t be used. It must be an address on this site that starts with "/", such as /new-page, without "?" or "#", or a full address on another site that starts with "https://".';
469
+ readonly 'issue.redirectUrl': '{field} "{path}" can\'t be used. An address on another site must start with "https://", such as https://example.com/page, and must not include a user name or password.';
470
+ readonly 'issue.redirectUrlParam': '{field} uses ":{name}" in an address on another site. Parts like ":{name}" can only be filled in on addresses on this site. Remove it, or use an address on this site.';
423
471
  readonly 'issue.redirectToDefaultLocale': '{field} "{path}" starts with "/{locale}", but addresses in the main language leave that out. Remove "/{locale}" from the start.';
424
472
  readonly 'issue.redirectParam': '{field} uses ":{name}", but the old address has no ":{name}" part to fill it in from.';
425
473
  readonly 'issue.redirectStatus': '{field} must be 301 (moved for good) or 302 (moved for now).';
@@ -433,6 +481,7 @@ export declare const en: {
433
481
  readonly 'csv.unterminatedQuote': 'Line {line}: a value starts with a quote mark (") that is never closed. Add the closing quote mark.';
434
482
  readonly 'agent.setting': 'A setting: it changes how this looks, not what it says.';
435
483
  readonly 'agent.refTarget': "Points to an entry in {label}. Give the entry's groupId.";
484
+ readonly 'agent.suggestedLength': "Best kept to {n} characters or fewer, so it isn't cut off where it's shown. Longer text is still accepted, up to the maximum length.";
436
485
  readonly 'agent.problem': '{field}: {problem}';
437
486
  readonly 'agent.date': 'A date written as YYYY-MM-DD, such as 2026-03-15.';
438
487
  readonly 'agent.datetime': 'A date and time written as YYYY-MM-DDTHH:MM:SS with Z or an offset, such as 2026-03-15T09:30:00Z.';
@@ -443,6 +492,7 @@ export declare const en: {
443
492
  readonly 'agent.readOnly': 'Shown when reading. You can leave it out when writing.';
444
493
  readonly 'agent.documentId': "The groupId of a page or entry of this site, not its document id. search_entries, get_document and describe_site give each one's groupId.";
445
494
  readonly 'agent.richText': 'Markdown. Allowed: {features}.';
495
+ readonly 'agent.inlineText': 'One line of Markdown, without paragraphs, headings or lists. Allowed: {features}.';
446
496
  readonly 'agent.richTextNone': 'Markdown with plain paragraphs only: no formatting is allowed.';
447
497
  readonly 'agent.richTextHeadings': 'headings of level {levels} (one # per level)';
448
498
  readonly 'agent.linkUrl': 'An address starting with https://, http://, mailto:, tel: or /.';
@@ -483,6 +533,7 @@ export declare const en: {
483
533
  readonly 'admin.nav.security': 'Security';
484
534
  readonly 'admin.nav.account': 'Your account';
485
535
  readonly 'admin.nav.content': 'Content';
536
+ readonly 'admin.nav.blocks': 'Building blocks';
486
537
  readonly 'admin.nav.site': 'Site';
487
538
  readonly 'admin.nav.open': 'Open menu';
488
539
  readonly 'admin.nav.close': 'Close menu';
@@ -738,6 +789,11 @@ export declare const en: {
738
789
  readonly 'admin.redirects.note': 'Note';
739
790
  readonly 'admin.redirects.permanent': '301 moved for good';
740
791
  readonly 'admin.redirects.temporary': '302 moved for now';
792
+ readonly 'admin.redirects.code.heading': "From the site's code";
793
+ readonly 'admin.redirects.code.intro': "These redirects come with the site's code. They change only when a new version of the site is released. To replace one, add a redirect here with the same old address.";
794
+ readonly 'admin.redirects.code.table': "Redirects from the site's code";
795
+ readonly 'admin.redirects.code.overridden': 'Replaced by a redirect you added';
796
+ readonly 'admin.redirects.code.hidden': 'Not used: a page has this address';
741
797
  readonly 'admin.redirects.source.manual': 'By hand';
742
798
  readonly 'admin.redirects.source.auto': 'Automatic (an address changed)';
743
799
  readonly 'admin.redirects.source.import': 'Import';
@@ -749,7 +805,7 @@ export declare const en: {
749
805
  readonly 'admin.redirects.toPath': 'An address';
750
806
  readonly 'admin.redirects.toDocument': 'A page on this site';
751
807
  readonly 'admin.redirects.toPathLabel': 'New address';
752
- readonly 'admin.redirects.toPathHint': 'A site address such as /about, or one that uses the :name parts of the old address.';
808
+ readonly 'admin.redirects.toPathHint': 'A site address such as /about, or one that uses the :name parts of the old address. To send visitors to another site, enter its full address starting with https://.';
753
809
  readonly 'admin.redirects.choose': 'Choose…';
754
810
  readonly 'admin.redirects.add': 'Add redirect';
755
811
  readonly 'admin.redirects.import': 'Import from a file';
@@ -900,6 +956,8 @@ export declare const en: {
900
956
  readonly 'admin.form.neededCount': '{n} needed to publish';
901
957
  readonly 'admin.form.hiddenSummary': 'Hidden from the page';
902
958
  readonly 'admin.form.none': 'None';
959
+ readonly 'admin.form.length': '{count} of {suggested} characters';
960
+ readonly 'admin.form.lengthOver': "Longer than the suggested {suggested} characters, so it may be cut off where it's shown, such as in search results. You can still save and publish it.";
903
961
  readonly 'admin.form.utc': '(UTC time)';
904
962
  readonly 'admin.form.slugHint': 'Leave empty to make one from the title';
905
963
  readonly 'admin.form.settings': 'Settings';
@@ -1005,6 +1063,12 @@ export declare const en: {
1005
1063
  readonly 'admin.richtext.blockquote': 'Quote';
1006
1064
  readonly 'admin.richtext.image': 'Image';
1007
1065
  readonly 'admin.richtext.hardBreak': 'Line break';
1066
+ readonly 'admin.richtext.table': 'Insert table';
1067
+ readonly 'admin.richtext.addRowAfter': 'Add row below';
1068
+ readonly 'admin.richtext.addColumnAfter': 'Add column right';
1069
+ readonly 'admin.richtext.deleteRow': 'Delete row';
1070
+ readonly 'admin.richtext.deleteColumn': 'Delete column';
1071
+ readonly 'admin.richtext.deleteTable': 'Delete table';
1008
1072
  readonly 'admin.richtext.unreadable': "This text contains something the editor can't show, so it can't be changed here. Your assistant can still change it.";
1009
1073
  readonly 'admin.picker.title': 'Choose';
1010
1074
  readonly 'admin.picker.close': 'Close';
@@ -1232,13 +1296,13 @@ export declare const en: {
1232
1296
  readonly 'mcp.param.mediaLimit': 'How many files to return, at most 100. Defaults to 30.';
1233
1297
  readonly 'mcp.param.mediaOffset': 'How many files to skip, to see the next ones. Defaults to 0.';
1234
1298
  readonly 'mcp.tool.list_redirects.title': 'List redirects';
1235
- readonly 'mcp.tool.list_redirects.description': 'Lists the redirects that send visitors from an old address to a new one. "to" is either a path or { document, title }, a page or entry that the redirect follows if its address changes.';
1299
+ readonly 'mcp.tool.list_redirects.description': 'Lists the redirects that send visitors from an old address to a new one. "to" is a path, a full https:// address on another site, or { document, title }, a page or entry that the redirect follows if its address changes. Redirects that come with the site\'s code are listed after the others with source "code" and id null: they are read-only and can only be overridden, by creating a redirect with the same old address.';
1236
1300
  readonly 'mcp.tool.create_redirect.title': 'Create a redirect';
1237
1301
  readonly 'mcp.tool.create_redirect.description': 'Sends visitors from an old address to a new one, such as after a page was moved or renamed. The old address must not be the address of a published page. To follow a page or entry even if its address changes later, point "to" at its groupId.';
1238
1302
  readonly 'mcp.tool.delete_redirect.title': 'Delete a redirect';
1239
- readonly 'mcp.tool.delete_redirect.description': 'Deletes a redirect, so visitors to the old address see "page not found" again. Check with the user before deleting.';
1303
+ readonly 'mcp.tool.delete_redirect.description': 'Deletes a redirect, so visitors to the old address see "page not found" again, or follow a redirect from the site\'s code with the same old address. A delete that would send visitors round in a loop is refused. Check with the user before deleting.';
1240
1304
  readonly 'mcp.param.redirectFrom': 'The old address, such as /old-about. A full web address is accepted; only its path is used.';
1241
- readonly 'mcp.param.redirectTo': 'Where visitors go: a path such as /about, or { "document": groupId } to follow a page or entry.';
1305
+ readonly 'mcp.param.redirectTo': 'Where visitors go: a path such as /about, a full address on another site starting with https://, or { "document": groupId } to follow a page or entry.';
1242
1306
  readonly 'mcp.param.redirectStatus': '301 (moved for good, the default) or 302 (moved for now).';
1243
1307
  readonly 'mcp.param.redirectNote': 'A note for the editors about why the redirect exists.';
1244
1308
  readonly 'mcp.param.redirectId': 'The id of the redirect, from list_redirects.';
@@ -55,6 +55,8 @@ export const en = {
55
55
  'definition.adminActor': 'An admin route asked who is signed in, but it was registered outside the signed-in area. Register it through registerScreens.',
56
56
  'definition.jsxAttribute': 'The attribute name "{name}" isn\'t allowed in a template. Use letters, numbers and dashes only.',
57
57
  'config.renderMissing': 'The template "{name}" has no render function, so its pages can\'t be shown. Add a render function to the template.',
58
+ 'config.headJsonLd': "A template added JSON-LD that can't be written as JSON.",
59
+ 'config.headHref': 'A template added a link to "{href}", which isn\'t a safe address. Use a path on this site or an http or https URL.',
58
60
  'config.publicKey': "That isn't a public key. It should look like ed25519: followed by letters and digits (as printed by inlaycms keygen), but it was: {text}",
59
61
  'config.baseUrl': 'The baseUrl option "{value}" can\'t be used. It must be the full address of the site starting with https:// or http://, with nothing after the domain, such as https://example.com.',
60
62
  'config.secret': 'The secret option must be at least 32 characters long. Use a long random value and keep it private.',
@@ -167,12 +169,34 @@ export const en = {
167
169
  'definition.notFound': 'The site\'s notFound names "{name}", but it must be the name of a singleton with path: null whose template has a render function.',
168
170
  'definition.publicPath': 'The site\'s publicPaths lists "{path}", but every entry must be a path starting with /, such as /healthz.',
169
171
  'definition.secretName': 'The site\'s secrets list "{name}" more than once or in the wrong form. Each secret is listed once, in capital letters, digits and underscores starting with a letter, such as SLACK_WEBHOOK.',
172
+ 'definition.headerName': 'The site\'s headers list "{name}", which is not allowed. List each header once, by a name made of letters, digits and hyphens, such as Permissions-Policy. Inlay sets Cache-Control, Content-Type, Set-Cookie, Location, ETag and Vary itself.',
173
+ 'definition.headerValue': 'The site\'s header "{name}" has a value that is not allowed. Give it a single line of text, or false to leave Inlay\'s default out.',
170
174
  'definition.migrationName': 'The site\'s migrations use the name "{name}" more than once or leave it empty. Give each migration its own name, such as team-to-people.',
171
175
  'definition.routePath': 'The route path "{path}" must start with "/", have no empty or dot segments, no "/" at the end, and contain no ":", "*", "?", "#" or "%".',
172
176
  'definition.routeReserved': 'The route path "{path}" belongs to Inlay itself (the home page, the admin, sign-in, MCP, media, public files, the sitemap or robots.txt). Pick another path.',
173
177
  'definition.routeShadows': 'The route path "{path}" would hide pages of "{name}" in one of the site\'s languages. Pick a path no page uses.',
178
+ 'definition.routeSitemap': 'The route {method} "{path}" has sitemap: true. Only GET routes can be listed in the sitemap.',
174
179
  'definition.routeDuplicate': 'Two routes handle {method} requests to "{path}". Keep one of them.',
175
180
  'definition.routeMethod': 'The route "{path}" uses the method {method}. Routes can only handle GET and POST.',
181
+ 'definition.redirectFrom': 'The redirect from "{from}" can\'t be used. Write the old address as a path such as /old-page, with no "?" or "#", no repeated ":name", and not under Inlay\'s own paths or the default language\'s prefix.',
182
+ 'definition.redirectTo': 'The redirect from "{from}" goes to "{to}", which can\'t be used. Point it at a path such as /about (without the default language\'s prefix) or a full https:// address without a user name.',
183
+ 'definition.redirectParam': 'The redirect from "{from}" uses ":{name}" in its target, but the old address has no such part. Use only the ":name" parts of the old address.',
184
+ 'definition.redirectUrlParam': 'The redirect from "{from}" uses ":{name}" in a full https:// address. Parts like ":{name}" are filled in only on paths of this site, so remove it from the address.',
185
+ 'definition.redirectStatus': 'The redirect from "{from}" uses the status {status}. Redirects can only use 301 or 302.',
186
+ 'definition.redirectDuplicate': 'The site redirects "{from}" more than once. Keep one of them.',
187
+ 'definition.redirectRoute': 'The redirect from "{from}" would never run, because a GET route answers at that path. Remove the redirect or the route.',
188
+ 'definition.seoTitleTemplate': 'The site\'s title template "{value}" must contain %s exactly once, where each page\'s title goes, such as "%s | My Site".',
189
+ 'definition.seoImage': 'The site\'s default share image "{value}" must be a file under /public/, such as /public/share.png.',
190
+ 'definition.seoDescription': "The site's default description must be text.",
191
+ 'definition.seoDefaultsTwice': 'Search and sharing defaults appear in both {first} and {second}. Keep f.seoDefaults() in one global only.',
192
+ 'definition.seoDefaultsPlace': '{field} uses f.seoDefaults(), which can only be a top-level field of a global.',
193
+ 'definition.ogType': 'The template "{name}" has ogType "{value}". Use "website" or "article".',
194
+ 'label.seoDefaults': 'Search and sharing defaults',
195
+ 'label.seoDefaults.titleTemplate': 'Title template',
196
+ 'label.seoDefaults.titleTemplateHelp': 'Put %s where the page\'s title goes, such as "%s | My Site". Pages with their own search title, and the home page, don\'t use it.',
197
+ 'label.seoDefaults.description': 'Default description',
198
+ 'label.seoDefaults.image': 'Default share image',
199
+ 'issue.titleTemplate': '{field} must contain %s exactly once, where the page\'s title goes, such as "%s | My Site".',
176
200
  'label.seo': 'Search and sharing',
177
201
  'label.seo.title': 'Title',
178
202
  'label.seo.description': 'Description',
@@ -204,7 +228,13 @@ export const en = {
204
228
  'issue.shippedFileMissing': '{field} uses the file "{path}", which doesn\'t exist or can\'t be read.',
205
229
  'issue.shippedFileUnknown': '{field} uses the file "{path}", which isn\'t part of this release.',
206
230
  'issue.shippedFileInvalid': '{field}: {problem}',
207
- 'issue.shippedRichTextImage': "{field}: Line {line}: shipped content can't include images in rich text, because there is no way to name their files there. Remove the image, or put it in an image field instead.",
231
+ 'issue.shippedImageRemote': '{field}: Line {line}: the image "{src}" is on another website, and a release never downloads anything. Download it into the site\'s folder and name it by its path, such as images/chart.png.',
232
+ 'issue.shippedImageRooted': '{field}: Line {line}: the image "{src}" starts with "/", which is an address on the site, not a file. Name the file by its path inside the site\'s folder, such as images/chart.png.',
233
+ 'issue.shippedImageOutside': '{field}: Line {line}: the image "{src}" is outside the site\'s folder. Move it into the site\'s folder and name it from there.',
234
+ 'issue.shippedImageMissing': '{field}: Line {line}: the image "{src}" doesn\'t exist or can\'t be read.',
235
+ 'issue.shippedImageUnknown': '{field}: Line {line}: the image "{src}" isn\'t part of this release.',
236
+ 'issue.shippedImageNotImage': '{field}: Line {line}: "{src}" isn\'t an image.',
237
+ 'issue.shippedImageInvalid': '{field}: Line {line}: {problem}',
208
238
  'issue.shippedKeyUnknown': '{field} points to "{key}" in {type}, which isn\'t part of the shipped content. Add it to the shipped content, or remove the reference.',
209
239
  'error.shippedContent': 'The shipped content for {label} ({locale}) has problems. Fix the content in the site code and try again.',
210
240
  'error.shippedEntry': 'The shipped content for {label} "{key}" ({locale}) has problems. Fix the content in the site code and try again.',
@@ -233,10 +263,15 @@ export const en = {
233
263
  'error.checkFailed': 'Inlay can\'t go ahead until the site code and the database fit together. Fix the {count} {count|problem|problems} below and try again.\n{list}',
234
264
  'error.noDatabase': 'There is no database file at {path}.',
235
265
  'error.configMissing': 'There is no Inlay config file at {path}.',
266
+ 'error.testSitePath': 'A test site fetches paths on the site, starting with / (such as /about), not "{path}".',
267
+ 'error.testSiteBody': 'A test site can send a text or URLSearchParams body, nothing else.',
268
+ 'error.testSiteClosed': 'This test site has been closed. Make a new one with createTestSite.',
236
269
  'error.packImport': "{file} imports {specifier}, which a release can't include. Site code imports Inlay from inlaycms/site (and the JSX runtime), and may use packages that can be bundled with it, but not Node's own modules or the rest of inlaycms. This check catches mistakes; what makes a release trusted is its signature.",
237
270
  'error.packForbidden': "{file} uses {what}, which a release can't include. Site code can't reach the server's process, load code by a computed name or run code from text. This check catches mistakes; what makes a release trusted is its signature.",
238
271
  'error.packBundle': "The site code couldn't be bundled into a release: {problem}",
239
272
  'error.packFile': 'The shipped content names the file {path}, but there is no file there.',
273
+ 'error.markdownImageReference': "{file}, line {line}: this image is written as a reference ([alt][name]), which Inlay can't follow in a Markdown file. Write the image inline instead, such as ![A chart](images/chart.png).",
274
+ 'error.markdownImageUnplaced': "{file}, line {line}: Inlay couldn't work out where this image's file is. Put the image on a line of its own, written simply, such as ![A chart](images/chart.png).",
240
275
  'error.releaseSignature': "This release isn't signed by a trusted key, so it wasn't opened.",
241
276
  'error.releaseInvalid': "This release file is damaged or wasn't made by inlaycms pack.",
242
277
  'error.releaseVersion': 'This release needs Inlay {need} or a later {series} version, but this server runs Inlay {version}.',
@@ -310,6 +345,11 @@ export const en = {
310
345
  'diff.release.migration': 'The migration function `{name}` will run.',
311
346
  'diff.release.routeAdded': 'Adds the route {method} {path}.',
312
347
  'diff.release.routeRemoved': 'Removes the route {method} {path}.',
348
+ 'diff.release.routeSitemapAdded': 'Lists the route {path} in the sitemap.',
349
+ 'diff.release.routeSitemapRemoved': 'No longer lists the route {path} in the sitemap.',
350
+ 'diff.release.redirectAdded': 'Adds the redirect {from} to {to} ({status}).',
351
+ 'diff.release.redirectRemoved': 'Removes the redirect {from} to {to}.',
352
+ 'diff.release.redirectChanged': 'The redirect from {from} now goes to {to} ({status}).',
313
353
  'diff.release.secrets': 'Needs the {count|secret|secrets} {names} set on the server.',
314
354
  'error.previewUnavailable': "The preview of this release couldn't be started. Try again in a moment.",
315
355
  'error.previewNotStaged': "{name} isn't waiting to go live any more (it was made live or deleted), so it can't be previewed.",
@@ -387,16 +427,21 @@ export const en = {
387
427
  'shipped.pathTaken': 'The shipped {label} "{key}" ({locale}) asks for the path {path}, which is already taken, so it keeps its current path {kept}. Change the path in the shipped content or in the admin.',
388
428
  'shipped.pathDropped': 'The shipped {label} "{key}" ({locale}) asks for the path {path}, which is already taken, so it was saved without a page of its own. Give it a free path in the shipped content or in the admin.',
389
429
  'report.slugShadowed': '"{title}" ({locale}) has the slug "{slug}", but its page {path} is hidden by a page or path Inlay serves first. Editors can\'t save it until the slug changes.',
430
+ 'report.redirectHidden': 'The redirect from {from} never fires: a published page now answers at that address. That is expected once the page has replaced the old URL, and you can remove the rule from the code when convenient.',
431
+ 'report.redirectLoop': 'The redirect from {from} sends visitors round in a loop together with the other redirects, so the server skips it. Change its target or remove one of the rules.',
390
432
  'richtext.unsupported': "Line {line}: rich text can't contain {feature}. Remove it, or write it as normal text instead.",
391
433
  'richtext.notAllowed': "Line {line}: this field can't contain {feature}. Remove it, or write it as normal text instead.",
392
434
  'richtext.headingLevel': "Line {line}: this field can't contain a level {level} heading (one with {level} # signs). Use one of these levels instead: {levels}.",
393
435
  'richtext.headingContent': "Line {line}: headings can't contain {feature}. Move it to a paragraph below the heading.",
436
+ 'richtext.tableNested': "Line {line}: tables can't go inside a list or a quote. Move the table out so it stands on its own.",
437
+ 'richtext.tableCell': "Line {line}: table cells can't contain {feature}. Keep each cell to text, bold, italic and links.",
394
438
  'richtext.imageSource': 'Line {line}: images must come from the media library, not from another address ("{src}"). Upload the image to the media library and use that instead.',
395
439
  'richtext.linkUrl': 'Line {line}: the link address "{href}" can\'t be used. Links must start with https://, http://, mailto:, tel: or /, or point to a page of this site.',
396
440
  'richtext.title': "Line {line}: {feature} can't have a title (the text in quotes after the address). Remove the title.",
397
441
  'richtext.unusedDefinition': 'Line {line}: "{text}" sets a link address that no link uses, so it would be lost. Remove the line, or use the address in a link.',
398
442
  'richtext.tooDeep': 'Line {line}: quotes and lists are nested too deeply here. Use fewer levels.',
399
443
  'richtext.unreadable': "Line {line}: this text couldn't be turned into rich text. Check its formatting and try again.",
444
+ 'richtext.inlineParagraphs': 'Line {line}: this field holds a single line of text. Join the lines into one, without a blank line between them.',
400
445
  'richtext.feature.heading': 'headings',
401
446
  'richtext.feature.bold': 'bold text',
402
447
  'richtext.feature.italic': 'italic text',
@@ -415,11 +460,14 @@ export const en = {
415
460
  'richtext.feature.other': 'this kind of formatting',
416
461
  'error.redirectInvalid': "This redirect can't be saved. Fix the problems listed and try again.",
417
462
  'error.redirectNotFound': "We couldn't find that redirect. It may already have been deleted.",
463
+ 'error.redirectDeleteLoop': "This redirect can't be deleted: without it, visitors to \"{path}\" would be sent round in a loop and never reach a page. Change where the other redirects in that loop go first.",
418
464
  'label.redirect.from': 'Old address',
419
465
  'label.redirect.to': 'New address',
420
466
  'label.redirect.status': 'Redirect type',
421
467
  'issue.redirectFrom': '{field} "{path}" can\'t be used. It must be an address on this site that starts with "/", such as /old-page, without "?" or "#", and not one reserved by Inlay (such as /admin or /media).',
422
- 'issue.redirectTo': '{field} "{path}" can\'t be used. It must be an address on this site that starts with "/", such as /new-page, without "?" or "#".',
468
+ 'issue.redirectTo': '{field} "{path}" can\'t be used. It must be an address on this site that starts with "/", such as /new-page, without "?" or "#", or a full address on another site that starts with "https://".',
469
+ 'issue.redirectUrl': '{field} "{path}" can\'t be used. An address on another site must start with "https://", such as https://example.com/page, and must not include a user name or password.',
470
+ 'issue.redirectUrlParam': '{field} uses ":{name}" in an address on another site. Parts like ":{name}" can only be filled in on addresses on this site. Remove it, or use an address on this site.',
423
471
  'issue.redirectToDefaultLocale': '{field} "{path}" starts with "/{locale}", but addresses in the main language leave that out. Remove "/{locale}" from the start.',
424
472
  'issue.redirectParam': '{field} uses ":{name}", but the old address has no ":{name}" part to fill it in from.',
425
473
  'issue.redirectStatus': '{field} must be 301 (moved for good) or 302 (moved for now).',
@@ -433,6 +481,7 @@ export const en = {
433
481
  'csv.unterminatedQuote': 'Line {line}: a value starts with a quote mark (") that is never closed. Add the closing quote mark.',
434
482
  'agent.setting': 'A setting: it changes how this looks, not what it says.',
435
483
  'agent.refTarget': "Points to an entry in {label}. Give the entry's groupId.",
484
+ 'agent.suggestedLength': "Best kept to {n} characters or fewer, so it isn't cut off where it's shown. Longer text is still accepted, up to the maximum length.",
436
485
  'agent.problem': '{field}: {problem}',
437
486
  'agent.date': 'A date written as YYYY-MM-DD, such as 2026-03-15.',
438
487
  'agent.datetime': 'A date and time written as YYYY-MM-DDTHH:MM:SS with Z or an offset, such as 2026-03-15T09:30:00Z.',
@@ -443,6 +492,7 @@ export const en = {
443
492
  'agent.readOnly': 'Shown when reading. You can leave it out when writing.',
444
493
  'agent.documentId': "The groupId of a page or entry of this site, not its document id. search_entries, get_document and describe_site give each one's groupId.",
445
494
  'agent.richText': 'Markdown. Allowed: {features}.',
495
+ 'agent.inlineText': 'One line of Markdown, without paragraphs, headings or lists. Allowed: {features}.',
446
496
  'agent.richTextNone': 'Markdown with plain paragraphs only: no formatting is allowed.',
447
497
  'agent.richTextHeadings': 'headings of level {levels} (one # per level)',
448
498
  'agent.linkUrl': 'An address starting with https://, http://, mailto:, tel: or /.',
@@ -483,6 +533,7 @@ export const en = {
483
533
  'admin.nav.security': 'Security',
484
534
  'admin.nav.account': 'Your account',
485
535
  'admin.nav.content': 'Content',
536
+ 'admin.nav.blocks': 'Building blocks',
486
537
  'admin.nav.site': 'Site',
487
538
  'admin.nav.open': 'Open menu',
488
539
  'admin.nav.close': 'Close menu',
@@ -738,6 +789,11 @@ export const en = {
738
789
  'admin.redirects.note': 'Note',
739
790
  'admin.redirects.permanent': '301 moved for good',
740
791
  'admin.redirects.temporary': '302 moved for now',
792
+ 'admin.redirects.code.heading': "From the site's code",
793
+ 'admin.redirects.code.intro': "These redirects come with the site's code. They change only when a new version of the site is released. To replace one, add a redirect here with the same old address.",
794
+ 'admin.redirects.code.table': "Redirects from the site's code",
795
+ 'admin.redirects.code.overridden': 'Replaced by a redirect you added',
796
+ 'admin.redirects.code.hidden': 'Not used: a page has this address',
741
797
  'admin.redirects.source.manual': 'By hand',
742
798
  'admin.redirects.source.auto': 'Automatic (an address changed)',
743
799
  'admin.redirects.source.import': 'Import',
@@ -749,7 +805,7 @@ export const en = {
749
805
  'admin.redirects.toPath': 'An address',
750
806
  'admin.redirects.toDocument': 'A page on this site',
751
807
  'admin.redirects.toPathLabel': 'New address',
752
- 'admin.redirects.toPathHint': 'A site address such as /about, or one that uses the :name parts of the old address.',
808
+ 'admin.redirects.toPathHint': 'A site address such as /about, or one that uses the :name parts of the old address. To send visitors to another site, enter its full address starting with https://.',
753
809
  'admin.redirects.choose': 'Choose…',
754
810
  'admin.redirects.add': 'Add redirect',
755
811
  'admin.redirects.import': 'Import from a file',
@@ -900,6 +956,8 @@ export const en = {
900
956
  'admin.form.neededCount': '{n} needed to publish',
901
957
  'admin.form.hiddenSummary': 'Hidden from the page',
902
958
  'admin.form.none': 'None',
959
+ 'admin.form.length': '{count} of {suggested} characters',
960
+ 'admin.form.lengthOver': "Longer than the suggested {suggested} characters, so it may be cut off where it's shown, such as in search results. You can still save and publish it.",
903
961
  'admin.form.utc': '(UTC time)',
904
962
  'admin.form.slugHint': 'Leave empty to make one from the title',
905
963
  'admin.form.settings': 'Settings',
@@ -1005,6 +1063,12 @@ export const en = {
1005
1063
  'admin.richtext.blockquote': 'Quote',
1006
1064
  'admin.richtext.image': 'Image',
1007
1065
  'admin.richtext.hardBreak': 'Line break',
1066
+ 'admin.richtext.table': 'Insert table',
1067
+ 'admin.richtext.addRowAfter': 'Add row below',
1068
+ 'admin.richtext.addColumnAfter': 'Add column right',
1069
+ 'admin.richtext.deleteRow': 'Delete row',
1070
+ 'admin.richtext.deleteColumn': 'Delete column',
1071
+ 'admin.richtext.deleteTable': 'Delete table',
1008
1072
  'admin.richtext.unreadable': "This text contains something the editor can't show, so it can't be changed here. Your assistant can still change it.",
1009
1073
  'admin.picker.title': 'Choose',
1010
1074
  'admin.picker.close': 'Close',
@@ -1241,13 +1305,13 @@ export const en = {
1241
1305
  'mcp.param.mediaLimit': 'How many files to return, at most 100. Defaults to 30.',
1242
1306
  'mcp.param.mediaOffset': 'How many files to skip, to see the next ones. Defaults to 0.',
1243
1307
  'mcp.tool.list_redirects.title': 'List redirects',
1244
- 'mcp.tool.list_redirects.description': 'Lists the redirects that send visitors from an old address to a new one. "to" is either a path or { document, title }, a page or entry that the redirect follows if its address changes.',
1308
+ 'mcp.tool.list_redirects.description': 'Lists the redirects that send visitors from an old address to a new one. "to" is a path, a full https:// address on another site, or { document, title }, a page or entry that the redirect follows if its address changes. Redirects that come with the site\'s code are listed after the others with source "code" and id null: they are read-only and can only be overridden, by creating a redirect with the same old address.',
1245
1309
  'mcp.tool.create_redirect.title': 'Create a redirect',
1246
1310
  'mcp.tool.create_redirect.description': 'Sends visitors from an old address to a new one, such as after a page was moved or renamed. The old address must not be the address of a published page. To follow a page or entry even if its address changes later, point "to" at its groupId.',
1247
1311
  'mcp.tool.delete_redirect.title': 'Delete a redirect',
1248
- 'mcp.tool.delete_redirect.description': 'Deletes a redirect, so visitors to the old address see "page not found" again. Check with the user before deleting.',
1312
+ 'mcp.tool.delete_redirect.description': 'Deletes a redirect, so visitors to the old address see "page not found" again, or follow a redirect from the site\'s code with the same old address. A delete that would send visitors round in a loop is refused. Check with the user before deleting.',
1249
1313
  'mcp.param.redirectFrom': 'The old address, such as /old-about. A full web address is accepted; only its path is used.',
1250
- 'mcp.param.redirectTo': 'Where visitors go: a path such as /about, or { "document": groupId } to follow a page or entry.',
1314
+ 'mcp.param.redirectTo': 'Where visitors go: a path such as /about, a full address on another site starting with https://, or { "document": groupId } to follow a page or entry.',
1251
1315
  'mcp.param.redirectStatus': '301 (moved for good, the default) or 302 (moved for now).',
1252
1316
  'mcp.param.redirectNote': 'A note for the editors about why the redirect exists.',
1253
1317
  'mcp.param.redirectId': 'The id of the redirect, from list_redirects.',
@@ -3,6 +3,8 @@ export type RuleTarget = {
3
3
  path: string;
4
4
  } | {
5
5
  document: string;
6
+ } | {
7
+ url: string;
6
8
  };
7
9
  /** The `:name` params of a path, in order. A param is a whole segment. */
8
10
  export declare function paramNames(path: string): string[];
@@ -43,6 +45,19 @@ export declare function ruleIndex<R extends {
43
45
  * on `path` and then the rest.
44
46
  */
45
47
  export declare function ruleCandidates<R>(registry: Registry, index: RuleIndex<R>, path: string): Generator<RuleCandidate<R>>;
48
+ /** Rule indexes in the order a request tries them: admin rules (7a), then the site's code rules (7b). */
49
+ export type RuleSets<R> = readonly [admin: RuleIndex<R>, code: RuleIndex<R>];
50
+ export type Hop<R> = {
51
+ candidate: RuleCandidate<R>;
52
+ } | {
53
+ fallback: string;
54
+ };
55
+ /**
56
+ * What answers a request for `path` after pages: each rule that could fire, admin rules then code
57
+ * rules, each in `ruleCandidates` order, and last the lowercase fallback when `path` has one.
58
+ * Every walker follows this.
59
+ */
60
+ export declare function nextHops<R>(registry: Registry, sets: RuleSets<R>, path: string): Generator<Hop<R>>;
46
61
  /** Whether a path's first segment is a site locale code, so it already names its locale. */
47
62
  export declare function hasLocalePrefix(registry: Registry, path: string): boolean;
48
63
  /** `path` in `locale`, unless it already names a locale. */
@@ -55,7 +70,8 @@ export declare function pathTarget(registry: Registry, locale: string, to: strin
55
70
  /**
56
71
  * Where each of `rules` is stored: an exact path target is followed through exact rules, taking a
57
72
  * hop `T → U` of a rule from `F` only when `canFollow(T, U, F)`. It stops at a document, a pattern
58
- * path, a path with no exact rule, or before coming back to a path already passed (loops are left
73
+ * path, a path with no exact rule, before a URL (a rule is never stored as going straight to another
74
+ * site), or before coming back to a path already passed (loops are left
59
75
  * for the caller to find). Chains shared between rules whose `from` has the same `scope` are
60
76
  * followed once, so `canFollow` may depend on `F` only through its scope.
61
77
  */
@@ -1,4 +1,4 @@
1
- import { splitLocale, withLocale } from '../site/paths.js';
1
+ import { lowercaseFallback, splitLocale, withLocale } from '../site/paths.js';
2
2
  const PARAM = /^:([A-Za-z_][A-Za-z0-9_]*)$/;
3
3
  /** The `:name` params of a path, in order. A param is a whole segment. */
4
4
  export function paramNames(path) {
@@ -101,6 +101,20 @@ export function* ruleCandidates(registry, index, path) {
101
101
  }
102
102
  }
103
103
  }
104
+ /**
105
+ * What answers a request for `path` after pages: each rule that could fire, admin rules then code
106
+ * rules, each in `ruleCandidates` order, and last the lowercase fallback when `path` has one.
107
+ * Every walker follows this.
108
+ */
109
+ export function* nextHops(registry, sets, path) {
110
+ for (const index of sets) {
111
+ for (const candidate of ruleCandidates(registry, index, path))
112
+ yield { candidate };
113
+ }
114
+ const fallback = lowercaseFallback(path);
115
+ if (fallback !== null)
116
+ yield { fallback };
117
+ }
104
118
  /** Whether a path's first segment is a site locale code, so it already names its locale. */
105
119
  export function hasLocalePrefix(registry, path) {
106
120
  return registry.locales.includes(path.split('/')[1] ?? '');
@@ -120,7 +134,8 @@ export function pathTarget(registry, locale, to, candidate) {
120
134
  /**
121
135
  * Where each of `rules` is stored: an exact path target is followed through exact rules, taking a
122
136
  * hop `T → U` of a rule from `F` only when `canFollow(T, U, F)`. It stops at a document, a pattern
123
- * path, a path with no exact rule, or before coming back to a path already passed (loops are left
137
+ * path, a path with no exact rule, before a URL (a rule is never stored as going straight to another
138
+ * site), or before coming back to a path already passed (loops are left
124
139
  * for the caller to find). Chains shared between rules whose `from` has the same `scope` are
125
140
  * followed once, so `canFollow` may depend on `F` only through its scope.
126
141
  */
@@ -139,8 +154,9 @@ export async function collapseTargets(exact, rules, canFollow, scope = () => '')
139
154
  break;
140
155
  }
141
156
  const next = exact.get(end.path)?.to;
142
- if (!next || ('path' in next && seen.has(next.path)) || !(await canFollow(end.path, next, rule.from)))
157
+ if (!next || 'url' in next || ('path' in next && seen.has(next.path)) || !(await canFollow(end.path, next, rule.from))) {
143
158
  break;
159
+ }
144
160
  seen.add(end.path);
145
161
  passed.push(end.path);
146
162
  end = next;
@@ -1,18 +1,16 @@
1
1
  import type { Selectable } from 'kysely';
2
2
  import type { DocumentsTable, RedirectsTable } from '../db/schema.js';
3
- import type { Registry } from '../registry/registry.js';
4
- import type { ContentIssue, CoreDeps, Ctx, LiveState, Redirect, RedirectInput, RouteMatch } from '../types.js';
3
+ import type { CodeRedirect, ContentIssue, CoreDeps, Ctx, LiveState, Redirect, RedirectInput, RouteMatch } from '../types.js';
5
4
  import { type RuleTarget } from './collapse.js';
5
+ import { cleanPath, redirectFrom } from './rule.js';
6
6
  type Row = Selectable<RedirectsTable>;
7
7
  export declare function rowTarget(row: Pick<Row, 'to_path' | 'to_group_id'>): RuleTarget;
8
8
  export declare function listRedirects(deps: CoreDeps): Promise<Redirect[]>;
9
- /** A clean decoded site path without a query or fragment, or `null`. */
10
- export declare function cleanPath(raw: string): string | null;
11
- /**
12
- * The stored form of a redirect's `from` (a full http(s) URL loses its origin), or `null` if it can't be
13
- * used. A default-locale prefix can't be used: such a request is sent to the unprefixed path first.
14
- */
15
- export declare function redirectFrom(registry: Registry, raw: string): string | null;
9
+ export { cleanPath, redirectFrom };
10
+ /** The site's code rules, in definition order, each marked when an admin rule or a page answers at its `from` first. */
11
+ export declare function listCodeRedirects(deps: CoreDeps): Promise<CodeRedirect[]>;
12
+ /** The `from` of each code rule that, with the stored rules, sends visitors round a loop with no stop. */
13
+ export declare function codeRedirectLoops(deps: CoreDeps): Promise<string[]>;
16
14
  /**
17
15
  * What a path resolves to without redirect rules, memoized for the duration of one write. A path is
18
16
  * a stop when this isn't `not_found`: a redirect rule never fires there.
@@ -27,14 +25,18 @@ export interface CheckedRule {
27
25
  /**
28
26
  * Checks a rule on its own (not against other rules): the shape of `from`
29
27
  * and `to` (neither may start with the default locale, which a request is
30
- * sent away from first), the status, and that an exact `from` isn't a
31
- * published page.
28
+ * sent away from first; a `to` that isn't a path must be an https URL), the
29
+ * status, and that an exact `from` isn't a published page.
32
30
  */
33
31
  export declare function checkRedirect(deps: CoreDeps, input: RedirectInput, look?: Lookup): Promise<{
34
32
  rule: CheckedRule | null;
35
33
  issues: ContentIssue[];
36
34
  }>;
37
35
  export declare function createRedirect(deps: CoreDeps, input: RedirectInput, ctx: Ctx): Promise<Redirect>;
36
+ /**
37
+ * Deleting a rule can uncover a code rule with the same `from`, or let the lowercase fallback answer
38
+ * there, and either can close a loop. Refuses the delete when some rule loops after it that didn't before.
39
+ */
38
40
  export declare function deleteRedirect(deps: CoreDeps, id: number, ctx: Ctx): Promise<void>;
39
41
  /**
40
42
  * Called by `publish` inside its transaction, before a document's published
@@ -55,4 +57,3 @@ export declare function importRedirects(deps: CoreDeps, csv: string, ctx: Ctx):
55
57
  created: number;
56
58
  updated: number;
57
59
  }>;
58
- export {};