barakopress 0.4.0 → 0.7.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.
- package/README.md +307 -37
- package/dist/blocks/bind.d.ts.map +1 -1
- package/dist/blocks/bind.js +16 -2
- package/dist/blocks/bind.js.map +1 -1
- package/dist/blocks/bindings.d.ts +13 -1
- package/dist/blocks/bindings.d.ts.map +1 -1
- package/dist/blocks/bindings.js +2 -2
- package/dist/blocks/bindings.js.map +1 -1
- package/dist/blocks/built-in.d.ts +17 -1
- package/dist/blocks/built-in.d.ts.map +1 -1
- package/dist/blocks/built-in.js +35 -18
- package/dist/blocks/built-in.js.map +1 -1
- package/dist/blocks/library.d.ts.map +1 -1
- package/dist/blocks/library.js +293 -12
- package/dist/blocks/library.js.map +1 -1
- package/dist/blocks/motion.d.ts +18 -0
- package/dist/blocks/motion.d.ts.map +1 -0
- package/dist/blocks/motion.js +0 -0
- package/dist/blocks/motion.js.map +1 -0
- package/dist/blocks/presets.d.ts +7 -1
- package/dist/blocks/presets.d.ts.map +1 -1
- package/dist/blocks/presets.js +8 -2
- package/dist/blocks/presets.js.map +1 -1
- package/dist/blocks/primitives.d.ts +11 -0
- package/dist/blocks/primitives.d.ts.map +1 -1
- package/dist/blocks/primitives.js +524 -14
- package/dist/blocks/primitives.js.map +1 -1
- package/dist/blocks/render.d.ts.map +1 -1
- package/dist/blocks/render.js +10 -1
- package/dist/blocks/render.js.map +1 -1
- package/dist/blocks/schema.d.ts +15 -2
- package/dist/blocks/schema.d.ts.map +1 -1
- package/dist/blocks/schema.js +76 -9
- package/dist/blocks/schema.js.map +1 -1
- package/dist/blocks/search-keys.d.ts +6 -0
- package/dist/blocks/search-keys.d.ts.map +1 -0
- package/dist/blocks/search-keys.js +75 -0
- package/dist/blocks/search-keys.js.map +1 -0
- package/dist/blocks/tokens.d.ts +1 -1
- package/dist/blocks/tokens.d.ts.map +1 -1
- package/dist/blocks/tokens.js +39 -7
- package/dist/blocks/tokens.js.map +1 -1
- package/dist/blocks/tree-blocks.d.ts +4 -0
- package/dist/blocks/tree-blocks.d.ts.map +1 -0
- package/dist/blocks/tree-blocks.js +102 -0
- package/dist/blocks/tree-blocks.js.map +1 -0
- package/dist/cms.d.ts +33 -1
- package/dist/cms.d.ts.map +1 -1
- package/dist/cms.js +108 -78
- package/dist/cms.js.map +1 -1
- package/dist/collections.d.ts +47 -2
- package/dist/collections.d.ts.map +1 -1
- package/dist/collections.js +110 -7
- package/dist/collections.js.map +1 -1
- package/dist/config.d.ts +215 -2
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +59 -1
- package/dist/config.js.map +1 -1
- package/dist/delivery.d.ts +27 -1
- package/dist/delivery.d.ts.map +1 -1
- package/dist/delivery.js +251 -81
- package/dist/delivery.js.map +1 -1
- package/dist/index.d.ts +20 -11
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -7
- package/dist/index.js.map +1 -1
- package/dist/related.d.ts +19 -2
- package/dist/related.d.ts.map +1 -1
- package/dist/related.js +45 -14
- package/dist/related.js.map +1 -1
- package/dist/revalidate-key.d.ts +6 -1
- package/dist/revalidate-key.d.ts.map +1 -1
- package/dist/revalidate-key.js +23 -7
- package/dist/revalidate-key.js.map +1 -1
- package/dist/routes/binding-report.d.ts +37 -0
- package/dist/routes/binding-report.d.ts.map +1 -0
- package/dist/routes/binding-report.js +141 -0
- package/dist/routes/binding-report.js.map +1 -0
- package/dist/routes/revalidate.d.ts +1 -0
- package/dist/routes/revalidate.d.ts.map +1 -1
- package/dist/routes/revalidate.js +100 -30
- package/dist/routes/revalidate.js.map +1 -1
- package/dist/routes/share.d.ts +1 -2
- package/dist/routes/share.d.ts.map +1 -1
- package/dist/routes/share.js +40 -10
- package/dist/routes/share.js.map +1 -1
- package/dist/routes/sitemap.d.ts +5 -1
- package/dist/routes/sitemap.d.ts.map +1 -1
- package/dist/routes/sitemap.js +54 -3
- package/dist/routes/sitemap.js.map +1 -1
- package/dist/screens/archive.d.ts +4 -0
- package/dist/screens/archive.d.ts.map +1 -1
- package/dist/screens/archive.js +4 -0
- package/dist/screens/archive.js.map +1 -1
- package/dist/screens/article-view.d.ts +29 -0
- package/dist/screens/article-view.d.ts.map +1 -0
- package/dist/screens/article-view.js +214 -0
- package/dist/screens/article-view.js.map +1 -0
- package/dist/screens/blog-index.d.ts +4 -1
- package/dist/screens/blog-index.d.ts.map +1 -1
- package/dist/screens/blog-post.d.ts.map +1 -1
- package/dist/screens/blog-post.js +10 -2
- package/dist/screens/blog-post.js.map +1 -1
- package/dist/screens/collection.d.ts +23 -5
- package/dist/screens/collection.d.ts.map +1 -1
- package/dist/screens/collection.js +118 -21
- package/dist/screens/collection.js.map +1 -1
- package/dist/screens/page.d.ts +4 -1
- package/dist/screens/page.d.ts.map +1 -1
- package/dist/screens/page.js +93 -6
- package/dist/screens/page.js.map +1 -1
- package/dist/screens/post-view.d.ts +7 -3
- package/dist/screens/post-view.d.ts.map +1 -1
- package/dist/screens/post-view.js +18 -183
- package/dist/screens/post-view.js.map +1 -1
- package/dist/screens/site-layout.d.ts +1 -1
- package/dist/screens/site-layout.d.ts.map +1 -1
- package/dist/screens/site-layout.js +10 -5
- package/dist/screens/site-layout.js.map +1 -1
- package/dist/screens/tree.d.ts +78 -0
- package/dist/screens/tree.d.ts.map +1 -0
- package/dist/screens/tree.js +185 -0
- package/dist/screens/tree.js.map +1 -0
- package/dist/secret.d.ts +6 -1
- package/dist/secret.d.ts.map +1 -1
- package/dist/secret.js +8 -1
- package/dist/secret.js.map +1 -1
- package/dist/site.d.ts.map +1 -1
- package/dist/site.js +194 -16
- package/dist/site.js.map +1 -1
- package/dist/store.d.ts +36 -0
- package/dist/store.d.ts.map +1 -0
- package/dist/store.js +98 -0
- package/dist/store.js.map +1 -0
- package/dist/theme.d.ts +24 -3
- package/dist/theme.d.ts.map +1 -1
- package/dist/theme.js +45 -3
- package/dist/theme.js.map +1 -1
- package/dist/tree.d.ts +56 -0
- package/dist/tree.d.ts.map +1 -0
- package/dist/tree.js +196 -0
- package/dist/tree.js.map +1 -0
- package/package.json +4 -1
- package/src/blocks/bind.ts +16 -2
- package/src/blocks/bindings.ts +15 -1
- package/src/blocks/built-in.tsx +60 -18
- package/src/blocks/library.ts +316 -17
- package/src/blocks/motion.ts +0 -0
- package/src/blocks/presets.ts +7 -2
- package/src/blocks/primitives.tsx +766 -17
- package/src/blocks/render.tsx +15 -1
- package/src/blocks/schema.ts +92 -9
- package/src/blocks/search-keys.tsx +74 -0
- package/src/blocks/tokens.ts +39 -7
- package/src/blocks/tree-blocks.tsx +120 -0
- package/src/cms.ts +112 -88
- package/src/collections.ts +143 -9
- package/src/config.ts +279 -3
- package/src/delivery.ts +293 -75
- package/src/index.ts +43 -5
- package/src/related.ts +56 -14
- package/src/revalidate-key.ts +27 -7
- package/src/routes/binding-report.ts +210 -0
- package/src/routes/revalidate.ts +99 -28
- package/src/routes/share.ts +40 -11
- package/src/routes/sitemap.ts +59 -4
- package/src/screens/archive.tsx +4 -0
- package/src/screens/article-view.tsx +478 -0
- package/src/screens/blog-post.tsx +10 -2
- package/src/screens/collection.tsx +218 -29
- package/src/screens/page.tsx +97 -6
- package/src/screens/post-view.tsx +34 -383
- package/src/screens/site-layout.tsx +15 -10
- package/src/screens/tree.tsx +389 -0
- package/src/secret.ts +7 -1
- package/src/site.ts +210 -21
- package/src/store.ts +117 -0
- package/src/theme.ts +64 -6
- package/src/tree.ts +250 -0
package/README.md
CHANGED
|
@@ -83,7 +83,7 @@ decision, not the engine's.
|
|
|
83
83
|
|
|
84
84
|
| Create | Export | From |
|
|
85
85
|
| --- | --- | --- |
|
|
86
|
-
| `app/page.tsx` | `default` | `
|
|
86
|
+
| `app/page.tsx` | `default`, `generateMetadata` | `createHome(config, blocks)`, `createHomeMetadata(config)` |
|
|
87
87
|
| `app/blog/[slug]/page.tsx` | `default`, `generateMetadata` | `createBlogPost(config)`, `createPostMetadata(config)` |
|
|
88
88
|
| `app/authors/[slug]/page.tsx` | `default` | `createArchive(config, "author")` |
|
|
89
89
|
| `app/categories/[slug]/page.tsx` | `default` | `createArchive(config, "category")` |
|
|
@@ -95,10 +95,15 @@ decision, not the engine's.
|
|
|
95
95
|
| `app/doctors/page.tsx` | `default` | `createCollectionIndex(config, "doctors")` |
|
|
96
96
|
| `app/doctors/[slug]/page.tsx` | `default`, `generateMetadata`, `generateStaticParams` | `createCollectionDetail(config, "doctors")`, `createCollectionMetadata(config, "doctors")`, `createCollectionStaticParams(config, "doctors")` |
|
|
97
97
|
| `app/api/blocks/route.ts` | `GET`, `OPTIONS` | `createBlockSchemaRoute(blocks)`, `createBlockSchemaPreflight()` |
|
|
98
|
+
| `app/api/blocks/bindings/route.ts` | `GET`, `OPTIONS` | `createBindingReportRoute(config, blocks)`, `createBindingReportPreflight()` |
|
|
98
99
|
| `app/layout.tsx` | `default`, `generateMetadata` | `createSiteLayout(config, { blocks })`, `createSiteMetadata(config)` |
|
|
99
|
-
| `app/%5Fshare/route.ts` | `GET` | `createSharePage()` |
|
|
100
|
+
| `app/%5Fshare/route.ts` | `GET` | `createSharePage(config)` |
|
|
100
101
|
| `app/api/share/redeem/route.ts` | `POST` | `createShareRedeemRoute(config)` |
|
|
101
102
|
|
|
103
|
+
`createHome` serves whatever the tenant picked for `/`: the page at `HomePath`, the index of
|
|
104
|
+
`HomeCollection`, or the post index when it picked neither, which is what `createBlogIndex` did and
|
|
105
|
+
still does for a site that mounts that instead.
|
|
106
|
+
|
|
102
107
|
Mount only what you want. Nothing requires anything else. The paths only have to agree with the
|
|
103
108
|
`routes` in your config, which is what every generated link is built from.
|
|
104
109
|
|
|
@@ -107,6 +112,17 @@ It reads `searchParams`, which forces the route dynamic, so a site using `output
|
|
|
107
112
|
`createBlogPost` and gives up preview. `createPostStaticParams` and `createArchiveStaticParams` exist
|
|
108
113
|
for that static case.
|
|
109
114
|
|
|
115
|
+
The binding report says why a binding on a page did not resolve, so an editor fixes it in barakoBrew
|
|
116
|
+
instead of asking whoever can read the server log. Ask for one page at a time, by `?slug=` or
|
|
117
|
+
`?path=`, and each problem names the binding as typed, the reason (`unknown scope`, `unbound scope`
|
|
118
|
+
or `no value`), and the block and field it came from. It reports the page as rendered, not as
|
|
119
|
+
stored, so a `{{item.X}}` outside a repeat is reported as an unbound scope. Give it the same `query`
|
|
120
|
+
option the page route has: off, which is the default, a `{{query.X}}` is an unbound scope for every
|
|
121
|
+
visitor and the report says so, and a report that resolved one anyway would tell an editor a field
|
|
122
|
+
works where it does not. It is never anonymous:
|
|
123
|
+
the caller presents the tenant's key as `Authorization: Bearer`, derived from `PRESS_SECRET` and
|
|
124
|
+
printed by `barakopress bindings-key <tenant>`. Answers are never cached.
|
|
125
|
+
|
|
110
126
|
`Card` and `PostView` are exported too, for a site that wants its own page but the engine's markup.
|
|
111
127
|
|
|
112
128
|
### Collections: any content type as a list and a detail page
|
|
@@ -144,20 +160,24 @@ merged over the configured collections by key. A build-time site passes `collect
|
|
|
144
160
|
| --- | --- |
|
|
145
161
|
| `type` | The content type. Required |
|
|
146
162
|
| `route` | The index is served at the route and an item at `route/slug`. Absent, items are listed and never linked |
|
|
147
|
-
| `fields` | `title` (required), `slug`, `summary`, `body` (markdown), `date`, `image`, `imageAlt`, `featured`, `tags`, `url`. Each is a field name or a list tried in order; `@createdAt` and `@updatedAt` read the entry itself |
|
|
163
|
+
| `fields` | `title` (required), `slug`, `summary`, `body` (markdown), `date`, `image`, `imageAlt`, `featured`, `tags`, `url`, `photo`, `progress`. Each is a field name or a list tried in order; `@createdAt` and `@updatedAt` read the entry itself. `photo` is a portrait drawn above the title, `image` the wide one, and `progress` is a number from 0 to 100 that `progressList` draws |
|
|
148
164
|
| `references` | Reference fields, each naming the collection it points into and the word a card puts before the link. Resolved in the same request |
|
|
149
165
|
| `sort` | Sent to the API, for example `-PublishedAt` |
|
|
150
166
|
| `feed` | Whether `createFeed(config, key)` serves it |
|
|
151
|
-
| `sitemap` | On unless `false` |
|
|
167
|
+
| `sitemap` | On unless `false`. A collection is paged to `pageSizes.sitemap` entries; the file stops at the standard's 50,000 URLs and says so in the log |
|
|
152
168
|
| `index` | Whether the root catch-all serves an index at the route. On unless `false`; the derived `author` and `category` have it off, so `/authors` stays a 404 unless a route file mounts it |
|
|
153
169
|
| `pageSize`, `label`, `noun` | Items on the index, its heading, and how a count reads |
|
|
154
170
|
| `colorBy` | A choice field whose option colours the item. See below |
|
|
171
|
+
| `related` | What an item page lists under the item: `"semantic"` for the items of this collection closest to it by meaning, `false` for none. Unset, the first collection that references this one |
|
|
172
|
+
| `readingTime` | Whether an item page shows a read time worked out from its body. Off unless `true` |
|
|
173
|
+
| `layout` | How an item page is drawn: `"list"`, the shell markup every collection has had, or `"article"`, the reading column the blog's posts are drawn in. See below |
|
|
174
|
+
| `tree` | Set when the collection is a manual rather than a flat list: sections, an order, nesting, products. See below |
|
|
155
175
|
|
|
156
176
|
A settings entry that does not read as a collection is left out whole: a type or field that is not a
|
|
157
|
-
plain identifier, a route that is not a plain site path, or no title field.
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
longer one wins.
|
|
177
|
+
plain identifier, a route that is not a plain site path, or no title field. `post`, `author` and
|
|
178
|
+
`category` are replaceable by key like any other collection, since every read goes through the
|
|
179
|
+
collection's own field map. A build-time collection mounted at `/` throws in `defineConfig`. When two
|
|
180
|
+
routes match, the longer one wins.
|
|
161
181
|
|
|
162
182
|
A request-time site cannot add a route file per tenant, so the root catch-all from the pages section
|
|
163
183
|
also serves every collection with a route: its index at the route, and an item one segment below. A
|
|
@@ -168,22 +188,114 @@ lists its doctors, the way an author's archive lists their posts. `listRelated(c
|
|
|
168
188
|
department, { via: "Department" })` returns the same list; `listRelated(config, post)` still returns
|
|
169
189
|
related posts by semantic search.
|
|
170
190
|
|
|
191
|
+
With `related: "semantic"` it lists the items of its own collection nearest it by meaning instead, so
|
|
192
|
+
an agency's case study gets the band a post has. That needs the CMS AI module: without it the search
|
|
193
|
+
answers nothing and the page draws no band at all, which is the same way the post page degrades.
|
|
194
|
+
`listRelatedItems(config, key, item)` returns that list on its own.
|
|
195
|
+
|
|
171
196
|
**Filtering.** `listCollection(config, "doctors", { filter: { Department: "cardiology" } })` takes a
|
|
172
197
|
reference field by the target's slug and any other field by the value it holds, a choice field by its
|
|
173
198
|
option. The API takes five filters. `createCollectionIndex(config, key, { filter })` takes the same,
|
|
174
199
|
and the `collection` block has `filterField` and `filterValue`.
|
|
175
200
|
|
|
176
|
-
**A
|
|
177
|
-
`
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
201
|
+
**A style per option.** With `colorBy: "AreaOfFocus"` on a `project` collection, the site settings
|
|
202
|
+
`OptionStyles` entry says how each option of that field is shown:
|
|
203
|
+
|
|
204
|
+
```json
|
|
205
|
+
{
|
|
206
|
+
"OptionStyles": {
|
|
207
|
+
"project.AreaOfFocus": {
|
|
208
|
+
"Providing clean water": { "tone": "sky", "icon": "location", "label": "Water" }
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
`tone` names a colour from `Colors`, a theme slot, or a colour written out, and each card, item page
|
|
215
|
+
and collection block item carries it as a left border. `icon` is one of the engine's icon names, and
|
|
216
|
+
`label` is the word a visitor reads in place of the option's own value; the value stays on the element
|
|
217
|
+
as `data-option`, where a site's own CSS can still find it. A tone that does not resolve to something
|
|
218
|
+
readable as a colour is dropped, a label past 40 characters is dropped, and an icon name nothing
|
|
219
|
+
draws draws nothing, each on its own rather than losing the whole entry.
|
|
220
|
+
|
|
221
|
+
`OptionColors` is the same thing said shorter, `{ "project.AreaOfFocus": { "Providing clean water":
|
|
222
|
+
"sky" } }`, an option whose style is a tone and nothing else. A tenant that saved colours keeps them,
|
|
223
|
+
and a style for the same option wins field by field. A build-time site passes `optionStyles`, or
|
|
224
|
+
`optionColors`, in the same shapes.
|
|
182
225
|
|
|
183
226
|
`Card` and `ItemView` are exported for a site that wants its own page, and `Card` still takes a `post`.
|
|
184
227
|
`getItem`, `listCollection` and `getGlobals(config)`, the tenant's settings entry as stored, are
|
|
185
228
|
exported too.
|
|
186
229
|
|
|
230
|
+
**A long-form layout.** `layout: "article"` draws an item as a reading column: a back link, the title
|
|
231
|
+
and standfirst, a byline from the collection's first reference, the date, a read time worked out from
|
|
232
|
+
the body, the other references, the tags, the cover image, the prose and a band of neighbours under
|
|
233
|
+
it. That is the page the blog's posts have always had, and it is a collection setting rather than a
|
|
234
|
+
blog screen, so a law firm's briefings or a newsroom's features get it by asking. Styled inline from
|
|
235
|
+
the theme, so it looks right whether or not the consumer imports `barakopress/styles.css`.
|
|
236
|
+
`PostView` is a wrapper over the same layout and is `@deprecated` for 1.0.0.
|
|
237
|
+
|
|
238
|
+
**Docs: a collection as a tree.** A manual is a collection plus four fields saying where each page
|
|
239
|
+
sits. `tree` names them, and the settings beside them say what the sidebar and the switcher show:
|
|
240
|
+
|
|
241
|
+
```json
|
|
242
|
+
{
|
|
243
|
+
"docs": {
|
|
244
|
+
"type": "doc", "route": "/docs", "label": "Documentation", "layout": "article",
|
|
245
|
+
"fields": { "title": "Title", "slug": "Slug", "body": "Body" },
|
|
246
|
+
"tree": {
|
|
247
|
+
"section": "Section", "order": "Order", "parent": "Parent", "product": "Product",
|
|
248
|
+
"sections": ["Getting started", "Guides", "Reference"],
|
|
249
|
+
"searchPath": "/docs",
|
|
250
|
+
"editPath": "Source",
|
|
251
|
+
"editBase": "https://github.com/owner/repo/edit/master/",
|
|
252
|
+
"products": [
|
|
253
|
+
{ "key": "cms", "label": "barakoCMS", "href": "/docs" },
|
|
254
|
+
{ "key": "press", "label": "barakoPress", "href": "/docs/press" }
|
|
255
|
+
]
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
| Key | What |
|
|
262
|
+
| --- | --- |
|
|
263
|
+
| `section` | The field holding the heading a page is grouped under |
|
|
264
|
+
| `order` | The field holding its position in that section. A page with none comes after those with one |
|
|
265
|
+
| `parent` | The field holding the slug of the page it hangs under, or a reference to it. A parent nobody has leaves the page at the top of its section rather than dropping it |
|
|
266
|
+
| `product` | The field naming the product it documents, matched against a product's `key`. One field name and not a list, since this one goes into an API filter |
|
|
267
|
+
| `sections` | The sections in the order the sidebar shows them. One not named here follows those that are. Named rather than worked out, because no ordering of the pages says which section comes first |
|
|
268
|
+
| `products` | What the switcher offers: a key, the word a reader sees, and where it goes. A destination that is not a site path or an http URL is dropped |
|
|
269
|
+
| `searchPath` | Where the search box submits, and whether one is drawn at all. Unset, no box, because only the site knows which of its routes reads the query |
|
|
270
|
+
| `editPath` | The field holding the page's path in whatever repository it is written in. Its slug when unset |
|
|
271
|
+
| `editBase` | Where "edit this page" points, with that path appended. Unset, no such link is drawn |
|
|
272
|
+
| `limit` | The most pages read to build the tree. 500 unless set, and 500 is the ceiling as well as the default |
|
|
273
|
+
|
|
274
|
+
An item page in such a collection draws the sidebar with the page being read marked, the switcher,
|
|
275
|
+
a search box, previous and next from the tree's reading order, and the edit link. The sidebar is a
|
|
276
|
+
`details` element, so it collapses on a phone with no script. `collectionTree(config, key, { product })`
|
|
277
|
+
and `treeNeighbours(order, slug)` return the same tree and the same neighbours for a site's own page.
|
|
278
|
+
|
|
279
|
+
**Search.** `searchCollection(config, key, query)` goes through barakoCMS's `/api/public/{type}/search`,
|
|
280
|
+
which matches only over the fields a type publishes, so a draft or a field held back from public
|
|
281
|
+
delivery can never come back. `createCollectionIndex(config, key, { search: true })` answers `?q=` with
|
|
282
|
+
what matched instead of the index; that reads the query, so the route is dynamic and `output: "export"`
|
|
283
|
+
refuses it, which is why it is off unless asked for. The box is a `form`, the results are links, and
|
|
284
|
+
the keyboard handling on top ("/" to focus, the arrow keys to walk the results, escape to clear) is the
|
|
285
|
+
one client component in the package. The root catch-all answers `?q=` on a collection index too, but
|
|
286
|
+
only where the route may be dynamic: a request-time site rewrites to a kept route, and a kept route
|
|
287
|
+
asking for the query fails rather than bailing out, so there the index lists and a page of blocks
|
|
288
|
+
holding the `search` block is where a reader searches.
|
|
289
|
+
|
|
290
|
+
Which is why `searchPath` exists rather than the box pointing at the collection's own route. Only the
|
|
291
|
+
site knows which of its routes reads the query, and a box submitting somewhere that ignores `q` sends
|
|
292
|
+
a reader to an unfiltered index that looks like a search which matched everything. Name the route that
|
|
293
|
+
answers, or name nothing and get no box.
|
|
294
|
+
|
|
295
|
+
**As blocks.** `docsSidebar`, `docsSwitcher` and `search` draw the same three on a page of blocks, each
|
|
296
|
+
taking a collection key. `search` takes a bindable `query`, so a landing page binds `{{query.q}}` and
|
|
297
|
+
the route file passes the query with `createPage(config, blocks, { query: true })`.
|
|
298
|
+
|
|
187
299
|
### Pages and navigation from the Pages module
|
|
188
300
|
|
|
189
301
|
With `BarakoCMS.Pages` installed, the CMS owns the page tree: which pages are in the menu, their
|
|
@@ -261,7 +373,8 @@ Blocks come in four layers.
|
|
|
261
373
|
|
|
262
374
|
**Layout primitives** hold blocks and no content: `section` (a tone, a width and a padding step),
|
|
263
375
|
`stack`, `row` (side by side, wrapping on a phone), `grid`, `flow`, `panel` (a card with a tone and
|
|
264
|
-
a frame), `
|
|
376
|
+
a frame), `stickyBar` (a band that stays put while the page moves under it, at the top or the
|
|
377
|
+
bottom), `spacer` and `divider`.
|
|
265
378
|
|
|
266
379
|
`row` and `grid` take one list per cell, which suits a designer placing each one. `flow` takes a
|
|
267
380
|
single list and lays out whatever is in it, which is what a `repeat` and a preset's `slot` produce:
|
|
@@ -270,11 +383,33 @@ because only a string field takes a binding, and a preset has to pass its own `c
|
|
|
270
383
|
|
|
271
384
|
**Content primitives** hold content and no layout: `text` (a variant from the theme's type scale),
|
|
272
385
|
`richText` (markdown), `image`, `video`, `embed` (an iframe, only for a host in `embedHosts`),
|
|
273
|
-
`icon`, `button`, `link`, `list
|
|
274
|
-
same `group` and only one is open at a time)
|
|
386
|
+
`icon`, `button`, `link`, `list`, `disclosure` (a labelled section that opens; give several the
|
|
387
|
+
same `group` and only one is open at a time), `comparisonTable` (rows typed as lines with `|`
|
|
388
|
+
between the cells, drawn as a real table with a heading on every column and every row) and
|
|
389
|
+
`progressBar` (how far along one thing is, as `role="progressbar"` so it is read and not only seen).
|
|
390
|
+
|
|
391
|
+
A comparison's first line is the column headings and the first cell of every line after it is that
|
|
392
|
+
row's heading. What goes in a cell is whatever the tenant types, ticks and dashes included: a mark
|
|
393
|
+
chosen inside the engine would be one more piece of English in the markup.
|
|
394
|
+
|
|
395
|
+
**Motion primitives** are drawn finished and animate only away from that: `reveal` (a wrapper whose
|
|
396
|
+
content lifts and fades in as it scrolls into view), `rotatingText` (a comma separated list of words,
|
|
397
|
+
one shown at a time), `typingTerminal` (lines typed in sequence, held, then started again) and
|
|
398
|
+
`codeSample` (a snippet with its language and one click to select the whole of it). `text` takes a
|
|
399
|
+
`motion` of `countUp`, which counts a plain number up to the figure already written in the markup,
|
|
400
|
+
and `flow` takes a `hueRotate` of `subtle` or `wide`, which turns each cell's hue through the
|
|
401
|
+
theme's own colours in a cycle of three.
|
|
402
|
+
|
|
403
|
+
All of it is CSS. There is no script, so a page with JavaScript off renders the terminal typed out,
|
|
404
|
+
the figure at its number and the first word of the rotation standing, and every animation sits inside
|
|
405
|
+
`prefers-reduced-motion: no-preference`, so a visitor who asked for less motion gets exactly the same
|
|
406
|
+
finished page. "When it comes into view" is `animation-timeline: view()`, and a browser without it
|
|
407
|
+
shows the finished state too. `src/blocks/motion.test.tsx` strips the guards out of every stylesheet
|
|
408
|
+
these emit and fails if anything left animates or hides anything.
|
|
275
409
|
|
|
276
410
|
Every primitive takes theme tokens and never a colour or a pixel value. Tones are `page`, `surface`,
|
|
277
|
-
`accent` and `
|
|
411
|
+
`accent`, `inverse` and `gradient` (the inverse band with the theme's three dark roles spread across
|
|
412
|
+
it); spacing is `none` to `xxl` from `theme.space`; type is a role from
|
|
278
413
|
`theme.text`; corners are `none`, `control`, `panel` or `pill`. A tenant that changes the scale
|
|
279
414
|
changes every page built from primitives, and nobody can put one client's blue into a block.
|
|
280
415
|
|
|
@@ -324,8 +459,10 @@ Field kinds are `text`, `markdown`, `url`, `number`, `boolean`, `select` (with `
|
|
|
324
459
|
(lists of nested blocks, handed to the component already rendered). The list is editor input, so a
|
|
325
460
|
block renders only when its type is registered and every prop passes its field. A present but wrong
|
|
326
461
|
value fails the whole block, a `url` must pass the same check markdown links do, and a component
|
|
327
|
-
never receives a prop its fields did not declare. A page reads at most
|
|
328
|
-
ones included, and
|
|
462
|
+
never receives a prop its fields did not declare. A page reads at most 400 blocks in total, nested
|
|
463
|
+
ones included, and ten levels deep. The count is spent on every block the binder walks through as
|
|
464
|
+
well as every one that comes out, so a band from the library costs eight or ten of it, and a page
|
|
465
|
+
that goes over loses its tail with nothing said.
|
|
329
466
|
|
|
330
467
|
`defineBlock<Props, SlotNames>` checks the fields against the props at compile time: every field
|
|
331
468
|
names a prop, its kind suits the prop's type, and a prop that is not optional must be `required`.
|
|
@@ -431,25 +568,44 @@ one to look different saves its own under the same name and that one wins.
|
|
|
431
568
|
| `hero` | The band at the head of a page | heading, body, image, imageAlt, primaryLabel, primaryHref, secondaryLabel, secondaryHref, tone, columns, align, padding |
|
|
432
569
|
| `band` | Copy with one call to action | tone, heading, body, label, href, align, padding, width |
|
|
433
570
|
| `statBand` | A row of figures | heading, tone, columns, padding, items |
|
|
434
|
-
| `cardGrid` | Cards from a collection | heading, collection, filterField, filterValue, empty, tone, columns, padding |
|
|
571
|
+
| `cardGrid` | Cards from a collection | heading, collection, filterField, filterValue, empty, tone, columns, padding, hueRotate, option |
|
|
435
572
|
| `peopleGrid` | People from a collection, typed in place, or both | heading, collection, filterField, filterValue, role, tone, columns, padding, items |
|
|
436
573
|
| `timeline` | Dated entries | heading, tone, padding, width, items |
|
|
437
574
|
| `steps` | Numbered entries | heading, tone, padding, width, items |
|
|
438
575
|
| `tiers` | Giving or pricing tiers | heading, tone, columns, padding, items |
|
|
439
576
|
| `keyValueTable` | A panel of facts | heading, tone, padding, radius, rows |
|
|
440
577
|
| `tabs` | Sections that open | heading, tone, padding, width, items |
|
|
578
|
+
| `announcement` | The one line above everything, and it stays there | message, label, href, tone, edge, align |
|
|
579
|
+
| `codeTabs` | A snippet to run, with the other ways behind it | heading, body, code, language, selectLabel, tone, padding, width, items |
|
|
580
|
+
| `progressList` | How far along each entry of a collection is | heading, collection, filterField, filterValue, empty, tone, padding, width |
|
|
581
|
+
| `changelogList` | Release entries, with the word for the kind of release | heading, collection, filterField, filterValue, empty, tone, padding, width |
|
|
582
|
+
| `faq` | Questions, all openable at once | heading, body, tone, padding, width, items |
|
|
441
583
|
| `map` | An embedded map, held to `embedHosts` | src, title, heading, aspect, tone, padding |
|
|
442
|
-
| `stat` | One figure and its label | value, label, align |
|
|
584
|
+
| `stat` | One figure and its label | value, label, align, motion |
|
|
443
585
|
| `timelineEntry` | One dated entry | date, title, body |
|
|
444
586
|
| `step` | One numbered step | number, title, body |
|
|
445
587
|
| `tier` | One tier | name, amount, body, label, href, tone |
|
|
446
588
|
| `person` | One person | name, role, photo, href, linkLabel, align |
|
|
447
589
|
| `keyValueRow` | One fact | label, value |
|
|
590
|
+
| `codeTab` | One more way to run it | label, code, language, selectLabel, group |
|
|
591
|
+
| `faqItem` | One question and its answer | question, answer, tone |
|
|
448
592
|
|
|
449
593
|
The blocks in the second half go in the first half's slots: stats in a `statBand`, entries in a
|
|
450
|
-
`timeline`, `disclosure` blocks in `tabs
|
|
451
|
-
`
|
|
452
|
-
|
|
594
|
+
`timeline`, `disclosure` blocks in `tabs`, `codeTab` blocks in `codeTabs`, `faqItem` blocks in
|
|
595
|
+
`faq`. A card grid reads its entries through `{{item.Title}}`, `{{item.Summary}}`,
|
|
596
|
+
`{{item.Date | date}}` and `{{item.Href}}`, so it works against whatever the tenant calls those
|
|
597
|
+
fields, and it takes the collection as a prop rather than knowing any name.
|
|
598
|
+
|
|
599
|
+
Set a card grid's `option` to `show` and each card carries the glyph and the word the site declared
|
|
600
|
+
for that entry's option, read through `{{item.Icon}}` and `{{item.Word}}`. With `filterField` and
|
|
601
|
+
`filterValue` picking the category, that is a module grid: one band per category, each card marked
|
|
602
|
+
with its own. It is off by default, so a grid that did not ask for it draws what it always drew.
|
|
603
|
+
|
|
604
|
+
`progressList` reads its figure through `{{item.Progress}}`, which is the collection's `progress`
|
|
605
|
+
field role: the tenant says which of its own fields holds a number from 0 to 100. `changelogList`
|
|
606
|
+
does not group by itself, because grouping means knowing which field holds the kind and that is the
|
|
607
|
+
tenant's field name. One band per kind with `filterField` and `filterValue` is the grouping, and the
|
|
608
|
+
chip on each entry is the option's own word.
|
|
453
609
|
|
|
454
610
|
## Configuring it
|
|
455
611
|
|
|
@@ -481,7 +637,7 @@ for a post type with no such field.
|
|
|
481
637
|
| `fields` | the blueprint's PascalCase names | operator only | Which field holds what |
|
|
482
638
|
| `pageFields` | the blueprint's PascalCase names | operator only | Which field on the page type holds what |
|
|
483
639
|
| `routes` | `/blog`, `/authors`, `/categories` | operator only | Where you mounted each route |
|
|
484
|
-
| `pageSizes` | 20, 50, 1000, 50 | `PageSizes` | Index, feed, sitemap, archive |
|
|
640
|
+
| `pageSizes` | 20, 50, 1000, 50 | `PageSizes` | Index, feed, sitemap, archive. The sitemap one bounds the entries one collection contributes, and is not a page size: the sitemap pages to that number at whatever size the API allows |
|
|
485
641
|
| `cacheTag` | `cms` | operator only | The tag this site purges. Two sites on one server need two tags |
|
|
486
642
|
| `backstopSeconds` | 300 | operator only | How long a cached read may live with no webhook. 0 disables it |
|
|
487
643
|
| `cmsTimeoutMs` | 5000 | operator only | How long any one call to the CMS may take, a share link redemption included. Past it the call has failed, and a request-time site answers from its last good copy |
|
|
@@ -496,13 +652,18 @@ for a post type with no such field.
|
|
|
496
652
|
| `reservedSlugs` | the routes and the engine's files | `ReservedSlugs`, added to them | First path segments a root-mounted page may not take. Adds to the defaults |
|
|
497
653
|
| `regions` | off | `HeaderPath`, `HeaderTone`, `FooterPath`, `FooterTone` | The header and the footer as block regions |
|
|
498
654
|
| `collections` | the blog's `post`, `author` and `category` | `Collections` | Content types rendered as lists and detail pages. See Collections |
|
|
499
|
-
| `
|
|
655
|
+
| `optionStyles` | none | `OptionStyles` | Tone, icon and label by `type.field` and option, for `colorBy` |
|
|
656
|
+
| `optionColors` | none | `OptionColors` | The same, when a tone is all an option has. Read as `optionStyles` |
|
|
657
|
+
| `labels` | English | `Labels` | The words the screens print for a visitor. See below |
|
|
658
|
+
| `store` | in process | operator only | Where the state a fleet has to agree on is kept: kept answers, the host map, the replay guard, the generation of each cache tag. Needed only when more than one container serves the site. See below |
|
|
659
|
+
| `home` | the post index | `HomePath`, `HomeCollection` | What `createHome` serves at `/`. See below |
|
|
500
660
|
| `theme` | the barakoCMS palette | `Colors`, `Fonts`, `Radii`, `Layout`, `Space`, `Text` | Colours, faces, radii and column widths. See below |
|
|
501
661
|
|
|
502
662
|
The third column is the whole of the split. A key marked operator only is one the image decides for
|
|
503
663
|
every tenant it serves, and each is that for a reason you can name: `types`, `fields`, `pageFields`
|
|
504
664
|
and `routes` are what the blog factories compile against, `cacheTag`, `backstopSeconds`,
|
|
505
|
-
`cmsTimeoutMs`, `cmsUrl`, `tenant` and `
|
|
665
|
+
`cmsTimeoutMs`, `cmsUrl`, `tenant`, `sites` and `store` are facts about the deployment rather than
|
|
666
|
+
the site,
|
|
506
667
|
and `pages` has to match a route file on disk. Everything else is that tenant's data, edited in
|
|
507
668
|
barakoBrew, and wins over what this file said. A tenant that sets nothing renders exactly as the
|
|
508
669
|
file says.
|
|
@@ -593,7 +754,7 @@ The settings are the singleton `site` type from barakoCMS `docs/site-settings.md
|
|
|
593
754
|
`Colors` (the theme slots), `Fonts` (a family name per role, and the stylesheet that loads it),
|
|
594
755
|
`Radii`, `Layout`, `TopBar`, `HeaderLinks`, `FooterColumns`, `SocialLinks`, `HeaderPath`,
|
|
595
756
|
`HeaderTone`, `FooterPath`, `FooterTone`, `AssetsAsSupplied`, `LogoAsSupplied`, `LogoClearSpace`,
|
|
596
|
-
`PageSizes` and `
|
|
757
|
+
`PageSizes`, `ReservedSlugs`, `Labels`, `HomePath` and `HomeCollection`. `Collections`, `OptionStyles` and `OptionColors` are read as the collections section
|
|
597
758
|
describes. `Variants` are not rendered yet. Every value is checked for shape; one that fails, and any the
|
|
598
759
|
entry leaves out, keeps the configured value, so a half-filled theme renders. A link is a path on the
|
|
599
760
|
site or an absolute http or https URL. Set `Url`: without it the feed and sitemap fall back to the
|
|
@@ -602,6 +763,70 @@ host the tenant was found by.
|
|
|
602
763
|
`createSiteLayout` and `createSiteMetadata` render the root layout from all of this: `lang`, the
|
|
603
764
|
faces, the palette, the top bar, header links, footer columns, social links and the copyright line.
|
|
604
765
|
|
|
766
|
+
**What the site serves at `/`.** Every site used to be a blog at the root, because the root route
|
|
767
|
+
mounted the post index and nothing else could be named:
|
|
768
|
+
|
|
769
|
+
| Field | Type | What |
|
|
770
|
+
| --- | --- | --- |
|
|
771
|
+
| `HomePath` | string | A site path such as `/home`. The page the Pages module serves there is the home page. Nothing served there falls back to the index, so naming a page before writing it is safe |
|
|
772
|
+
| `HomeCollection` | string | The key of a collection. Its index is the home page. `HomePath` wins when both are set |
|
|
773
|
+
|
|
774
|
+
Neither set, `/` is the post index, which is what it was. The blog's own `post`, `author` and
|
|
775
|
+
`category` are ordinary `Collections` entries now, so a school whose news lives in `article` with a
|
|
776
|
+
`Headline` replaces `post` in its settings and gets both its list and its item pages from that entry.
|
|
777
|
+
The RSS link in the built-in header, and the feed alternate in the page metadata, appear only when
|
|
778
|
+
some collection has `feed` on, so a clinic with no posts stops advertising an empty feed.
|
|
779
|
+
|
|
780
|
+
**The words a visitor reads.** `Labels` is the visitor-facing copy, key by key. A school setting
|
|
781
|
+
`Locale` to `fil-PH` used to get Filipino dates beside English "min read" and "Related":
|
|
782
|
+
|
|
783
|
+
```json
|
|
784
|
+
{ "Labels": { "minRead": "minutong pagbasa", "by": "ni", "related": "Kaugnay" } }
|
|
785
|
+
```
|
|
786
|
+
|
|
787
|
+
| Key | English |
|
|
788
|
+
| --- | --- |
|
|
789
|
+
| `minRead` | `min read` |
|
|
790
|
+
| `by` | `by` |
|
|
791
|
+
| `related` | `Related` |
|
|
792
|
+
| `relatedNote` | `cosine similarity, computed on load, not curated` |
|
|
793
|
+
| `featured` | `Featured` |
|
|
794
|
+
| `back` | `Back` |
|
|
795
|
+
| `home` | `Home` |
|
|
796
|
+
| `preview` | The banner over a draft being previewed |
|
|
797
|
+
| `untitled` | `Untitled` |
|
|
798
|
+
| `feed` | `RSS` |
|
|
799
|
+
| `empty`, `emptyNote` | The notice on an index with nothing published |
|
|
800
|
+
| `failed`, `failedNote` | The notice on an index whose read failed |
|
|
801
|
+
| `shareInvalid` | `This link is not valid or has expired.` |
|
|
802
|
+
|
|
803
|
+
A key left out, or saved as anything but a word, keeps the English, so a half-filled map reads. A
|
|
804
|
+
build-time site passes `labels` to `defineConfig`. Nothing about a site's own content is here: a
|
|
805
|
+
collection's heading is its `label` and how its count reads is its `noun`.
|
|
806
|
+
|
|
807
|
+
**The colour slots, by role.** `Colors` sets any slot of the palette, one at a time. The slots are
|
|
808
|
+
`pageBg`, `surface`, `ink`, `proseInk`, `secondaryInk`, `muted`, `hairline`, `accent`, `accentHover`,
|
|
809
|
+
`accentInk`, `accentTint`, `accentTintBorder`, `accentBorderStrong`, `inverse`, `inverseChrome`,
|
|
810
|
+
`inverseInk`, `inverseAccent`, `code` and `success`. A role says where a colour goes rather than what
|
|
811
|
+
it looks like: `inverse` is the band that reverses the page, the footer and a code panel and an
|
|
812
|
+
inverse block, so a bakery with a cream footer sets `inverse` to cream and reads right doing it.
|
|
813
|
+
|
|
814
|
+
```json
|
|
815
|
+
{ "Colors": { "accent": "#17458F", "inverse": "#F4E3C1", "inverseInk": "#3B2A17" } }
|
|
816
|
+
```
|
|
817
|
+
|
|
818
|
+
Six slots shipped in 0.3.0 under barakocms.com's own names, and those still work: `darkPanel`,
|
|
819
|
+
`darkPanelChrome`, `darkPanelInk`, `darkPanelAccent`, `codeGreen` and `accentTintBorderStrong` are
|
|
820
|
+
read into `inverse`, `inverseChrome`, `inverseInk`, `inverseAccent`, `code` and `accentBorderStrong`.
|
|
821
|
+
Setting either name sets both, so a tenant saved before the rename keeps its site and a consumer's
|
|
822
|
+
own component reading `theme.colors.darkPanel` keeps compiling. The old names are deprecated and go
|
|
823
|
+
in 2.0.0. An `OptionStyles` or `OptionColors` entry naming an old slot resolves too.
|
|
824
|
+
|
|
825
|
+
Sizes work the same way. `Text` is the type scale by role, `meta`, `small`, `body`, `lead`,
|
|
826
|
+
`subheading`, `heading`, `title`, `display` and `pageTitle`, and `Space` is the spacing scale. The
|
|
827
|
+
blocks and the screens read those names, so a tenant that wants bigger headings sets `title` once
|
|
828
|
+
instead of asking for a release.
|
|
829
|
+
|
|
605
830
|
**How many items, per tenant.** `PageSizes` sets the four counts for this site, each on its own:
|
|
606
831
|
|
|
607
832
|
```json
|
|
@@ -699,12 +924,14 @@ The registry the regions render with is the one passed to `createSiteLayout(conf
|
|
|
699
924
|
the built-in blocks when none was passed.
|
|
700
925
|
|
|
701
926
|
**Caching per tenant.** Every read carries the tenant in `X-Tenant` and in its cache tag,
|
|
702
|
-
`<cacheTag>:<tenant
|
|
703
|
-
tenant
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
927
|
+
`<cacheTag>:<tenant>`, and a narrower tag beside it: `<tenant tag>:entry:<type>:<slug>` on a read of
|
|
928
|
+
one entry, `<tenant tag>:type:<type>` on a list, a search, the settings and the page tree. The webhook
|
|
929
|
+
purges the tags of the tenant its host resolves to, so point each tenant's webhook at
|
|
930
|
+
`https://<that tenant's domain>/api/revalidate`, signed with that tenant's own key (see
|
|
931
|
+
[One key per tenant](#one-key-per-tenant)). A publish on one tenant leaves every other tenant's cached
|
|
932
|
+
reads in place.
|
|
933
|
+
|
|
934
|
+
**When the CMS is down.** Each successful read is also kept in the store, keyed by CMS, tenant and path.
|
|
708
935
|
A read that fails with a network error, a 5xx, or no answer within `cmsTimeoutMs` answers from the
|
|
709
936
|
last good copy and logs a warning; the next successful read replaces it. For ten seconds after such a
|
|
710
937
|
failure that read answers from the copy without asking the CMS, so an outage costs one request per
|
|
@@ -739,8 +966,8 @@ While a tenant is holding, for that tenant only:
|
|
|
739
966
|
- route handlers (revalidate, blocks, `/_share`, `/api/share/redeem`) and `/_next/static` are served
|
|
740
967
|
as usual.
|
|
741
968
|
|
|
742
|
-
Switching `Mode` is a publish: the webhook
|
|
743
|
-
settings. No deploy.
|
|
969
|
+
Switching `Mode` is a publish: the webhook drops the tag the settings read carries and the next
|
|
970
|
+
request reads the new settings. No deploy.
|
|
744
971
|
|
|
745
972
|
**Site share links.** barakoCMS creates, lists and revokes them; anyone who may update the `site` type
|
|
746
973
|
can. A client is given `{site Url}/_share#{key}`. The key is in the fragment, so no server log, proxy
|
|
@@ -907,6 +1134,49 @@ Every read in `src/delivery.ts` is tagged with your `cacheTag`. `POST /api/reval
|
|
|
907
1134
|
the moment barakoCMS says something changed, so a publish is live in one request and the steady state
|
|
908
1135
|
is no database reads.
|
|
909
1136
|
|
|
1137
|
+
### What a publish drops
|
|
1138
|
+
|
|
1139
|
+
A read carries a second, narrower tag beside the site's own: the entry's when it read one entry, the
|
|
1140
|
+
type's when it read a list, a search, the site settings or the page tree. barakoCMS names the content
|
|
1141
|
+
type and sends the entry's public data with every delivery, so a publish drops that type's tag and
|
|
1142
|
+
that entry's tag, and leaves every other entry of the type cached. Correcting one typo on a school
|
|
1143
|
+
with a thousand news posts re-renders that post and the lists it appears in, not the other 999.
|
|
1144
|
+
|
|
1145
|
+
A delivery that names no content type, or one this site renders nothing of, drops the site's own tag,
|
|
1146
|
+
which is every read it has cached. That is what every delivery did before this, so a workflow posting
|
|
1147
|
+
a body of its own keeps working.
|
|
1148
|
+
|
|
1149
|
+
A response barakoCMS marks `Cache-Control: no-store` is not cached: the class is remembered against
|
|
1150
|
+
that path and every later read of it asks the CMS uncached, carrying no tag. That is how a type that
|
|
1151
|
+
has to be fresh to the minute lives beside pages cached for hours.
|
|
1152
|
+
|
|
1153
|
+
### Running more than one container
|
|
1154
|
+
|
|
1155
|
+
The kept answers, the host to tenant map, the webhook replay guard and the generation of each cache
|
|
1156
|
+
tag are in process by default, which is right for one container and wrong for two: a purge reaches
|
|
1157
|
+
one of them through the load balancer, and the others keep serving their own copies until the
|
|
1158
|
+
backstop runs out.
|
|
1159
|
+
|
|
1160
|
+
Pass a `store` on the config and they share it. It is three methods over anything the deployment
|
|
1161
|
+
already runs:
|
|
1162
|
+
|
|
1163
|
+
```ts
|
|
1164
|
+
import type { PressStore } from "barakopress";
|
|
1165
|
+
|
|
1166
|
+
const store: PressStore = {
|
|
1167
|
+
async get(key) { return (await redis.get(key)) ?? null; },
|
|
1168
|
+
async set(key, value, ttlSeconds) { await (ttlSeconds ? redis.set(key, value, { EX: ttlSeconds }) : redis.set(key, value)); },
|
|
1169
|
+
async delete(key) { await redis.del(key); },
|
|
1170
|
+
// Only when the key is absent, atomically. This is what honours a replayed delivery once.
|
|
1171
|
+
async add(key, value, ttlSeconds) { return (await redis.set(key, value, { NX: true, ...(ttlSeconds ? { EX: ttlSeconds } : {}) })) !== null; },
|
|
1172
|
+
};
|
|
1173
|
+
```
|
|
1174
|
+
|
|
1175
|
+
A purge one container receives then reaches the rest: the honoured delivery writes a generation
|
|
1176
|
+
against each tag it dropped, and a read carries the newest generation of its own tags in the URL it
|
|
1177
|
+
asks the CMS for, so a container that was never told is asking for something it has never cached.
|
|
1178
|
+
Next's own data cache stays per container; what crosses is the knowledge that it is out of date.
|
|
1179
|
+
|
|
910
1180
|
Each read also carries a backstop, 300 seconds by default. That is not for correctness, it is for the
|
|
911
1181
|
deployment where nobody ever created the webhook: without it their blog would be empty forever and
|
|
912
1182
|
nothing would say why. With it, a missing webhook degrades publishing from instant to a few minutes.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bind.d.ts","sourceRoot":"","sources":["../../src/blocks/bind.ts"],"names":[],"mappings":"AAAA,OAAO,KA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
|
const value = props[field.name];
|
|
69
69
|
if (typeof value !== "string" || !isBindable(field) || !hasBinding(value))
|
|
70
70
|
continue;
|
|
71
|
-
const { text } = await bindText(value, source);
|
|
71
|
+
const { text } = await bindText(value, source, { block: block.definition.type, field: field.name });
|
|
72
72
|
if (text === "") {
|
|
73
73
|
if (options.allowEmpty) {
|
|
74
74
|
props[field.name] = "";
|
|
@@ -92,7 +92,7 @@ async function boundString(block, source, name) {
|
|
|
92
92
|
return "";
|
|
93
93
|
if (!hasBinding(value))
|
|
94
94
|
return value;
|
|
95
|
-
return (await bindText(value, source)).text;
|
|
95
|
+
return (await bindText(value, source, { block: block.definition.type, field: name })).text;
|
|
96
96
|
}
|
|
97
97
|
/* ------------------------------------------------------------- control blocks */
|
|
98
98
|
async function bindShowIf(block, frame, ctx) {
|
|
@@ -241,6 +241,20 @@ export function itemScope(config, item) {
|
|
|
241
241
|
Tags: item.tags,
|
|
242
242
|
Option: item.option,
|
|
243
243
|
Color: item.color,
|
|
244
|
+
/*
|
|
245
|
+
* The progress figure and the option's style, so a bar and a card can draw what the site
|
|
246
|
+
* declared (#52) without a block naming either.
|
|
247
|
+
*
|
|
248
|
+
* Spread in only when there is something in them, the way `Href` already is. `walk` reads a
|
|
249
|
+
* path with `Object.hasOwn`, so a key set to `undefined` is a hit rather than a miss, and
|
|
250
|
+
* laying one over a tenant's own field of that name would take the field away. `Icon` is a
|
|
251
|
+
* plausible name for a field on exactly the collections this is for.
|
|
252
|
+
*/
|
|
253
|
+
...(item.progress !== undefined ? { Progress: item.progress } : {}),
|
|
254
|
+
...(item.style?.icon !== undefined ? { Icon: item.style.icon } : {}),
|
|
255
|
+
...(item.style?.label ?? item.option) !== undefined
|
|
256
|
+
? { Word: item.style?.label ?? item.option }
|
|
257
|
+
: {},
|
|
244
258
|
...(route !== undefined && item.slug ? { Href: `${route}/${item.slug}` } : {}),
|
|
245
259
|
...Object.fromEntries(Object.entries(item.refs).map(([field, ref]) => [field, ref ? { ...ref } : undefined])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