Appearance
The schema, jtk/schema.json
A site declares what its content is made of in its schema, jtk/schema.json, committed to its own repository. The panel draws its forms from that file, the annotation lint checks the built pages against it, the import and the publish gate read it — so it is the one document that decides what a client is able to edit, and in which languages.
It is judged by validate_schema (POST /v1/registry/validate), and everything wrong with it comes back at once, each finding carrying a code.
The contract this service teaches is 3, and a new site is written in it. A site made before 12 November 2026 may still be on contract 2, jtk/catalogue.json, until the platform's team moves it with jtk upgrade contract-3: its words are at the end of this page.
At a glance
| the file | jtk/schema.json in the site's repository. On the scaffold npx @jtakeit/astro schema writes it from src/content/blocks.ts, gives every page and entry its id and every block, row and picture its _key where a file lacks one, and seeds jtk/modules/bookings.json |
| the contract | "contract": 3, required. A tree holding both jtk/schema.json and jtk/catalogue.json is refused |
| judged by | validate_schema — by site and ref it judges the whole commit; with the tree sent as text, the working copy — every finding at once |
| every key | one of the tables below. Any other key, at any depth, is refused — JTK_E_SCHEMA_KEY_UNKNOWN — and a word of contract 2's is answered with contract 3's |
| the languages | locale, required, is the site's own; locales the others. A translation is a file beside its original — translations |
| a block type | type (unique, permanent) and v (1), label, fields |
| a field | key, label, kind — one of 19, closed (field kinds) — and client_editable: true on what the owner edits; absent is false |
what min / max count | depends on the kind: characters, the value, or rows — field kinds. Absent is unbounded, and 0 is a bound |
| per language | by the kind — words are, facts are not — unless a field says localized (field kinds) |
| a collection | declared here, its entries jtk/entries/<name>/<slug>.json; route says where they are — {"detail": "/works/{slug}", "listing": "/works"}, or "none" with shown_on: ["/prices#{slug}"] |
| a reference | "ref": {"to": ["categories"]}; "many": true for several. The value is the entry's id |
| grouping, categories, tags | group names a select or a ref to another collection; tags are a ref with many: true — categories, tags and trees |
| shared text | shared lists the block types jtk/shared.json holds; a field there may say its role — name, phone, street — and the structured data is built from them |
| a module | modules binds a domain's roles to collections — modules |
| the currency | not the schema's: the site's setting, given once to create_site |
The shape
Every key, from the types the judge reads the file with; there are no others. Words is a sentence, or an object of language tag to sentence — "Preise", {"de": "Preise", "en": "Prices"}.
The file
The top level of jtk/schema.json.
| key | holds | required | |
|---|---|---|---|
contract | 3 | yes | The contract the file is written in. A jtk/schema.json that says another is refused (JTK_E_CONTRACT_UNKNOWN); contracts 1 and 2 are written in jtk/catalogue.json. |
generator | a string | no | The tool that wrote the file — @jtakeit/astro. Provenance; nothing reads it. |
blocks | a list of block types | yes, one or more | Every shape the content of a page, an entry or the shared text comes in. |
page_seo | a list of fields | no | The SEO fields of a page and of an entry with a page of its own — title, description. Undeclared, a document's seo holds nothing. |
collections | a list of collections | no | The sets of entries the owner adds to: posts, services, masters, products. |
modules | an object: module → role → collection | no | Turns a module on and points each of its roles at a collection of this schema — modules. |
locale | a language tag | yes | The site's own language, de-CH: its documents are written in it, and the site takes it from here. Canonical BCP 47, the region in capitals. |
locales | a list of language tags | no | The site's other languages. Each document may have a translation beside it in each (translations); locale is not repeated here. |
shared | a list of block types | no | The block types jtk/shared.json may hold — the text on every page. A field of one of them may say a role. |
render | "live" | no | The template draws a draft at request time the way it draws its files at build time, so the panel's preview shows a saved field at once — the panel. The scaffold of @jtakeit/astro says it. Every build checks it, by drawing a few pages live against the built ones, and shows the build where they differ; what is published is always the build. Any other value is refused (JTK_E_ATTRIBUTE_INVALID). |
A block type
One entry of blocks — a shape a page's, an entry's or the shared text's content comes in.
| key | holds | required | |
|---|---|---|---|
type | a name | yes | Unique, and permanent once content is written under it. Lowercase letters, digits and _, from a letter. A module's own settings type (bookings_config) is taken. |
v | a whole number | yes | The type's version, 1. A block in a document says the v it was written at; one older than its type's is brought up by upcast, and refused where no step brings it (JTK_E_BLOCK_BEHIND). |
label | words | no | What the panel calls a block of this type. |
hint | words | no | A line the panel shows when the owner adds a block of this type. |
fields | a list of fields | yes, one or more | What a block of this type holds. |
views | a list of views | no | The arrangements a block with one gallery may be shown in: the designer writes the menu, the owner picks from it. |
collects | "enquiry" | on a block whose form keeps what a visitor types | Says the block collects enquiries, which the launch gate and the privacy notice read. |
asks | a list of fields | no, and only where collects | The form's questions beyond name, contact and message, each a field with its label. |
photos | a whole number, 1–7 | no, and only where collects | How many photographs a visitor may attach to an enquiry sent through this block's form. |
upcast | a list of steps | one step per older v content still has | How content written at an older v of this type becomes the current one — upcasters. The platform applies them when it reads the content, and the next save writes the current v. |
form | a form | no, and only on a collection's type | How the panel lays out an entry's card and a new entry: sections, rows of fields on a grid of six columns, an aside, a control per field — a form. Absent, the panel lays the fields out by their kinds. |
A field
One entry of a block's fields, of a list's of, of a block's asks, or of page_seo.
| key | holds | required | |
|---|---|---|---|
key | a name | yes | Unique in its block or row, and permanent once content has it. Lowercase letters, digits and _, from a letter. |
label | words | yes | What the owner reads in the panel. |
hint | words | no | A line under the control in the panel — what the value changes on the page. |
kind | one of the field kinds | yes | What the value is; closed, eighteen kinds. |
required | true or false | no | The value must be there on a document shown on the site — on a list, one row or more. A save of a shown entry without it is refused (JTK_E_ENTRY_INCOMPLETE); a hidden entry may lack it. |
min | a whole number | no | The lower bound. What it counts is the kind's (field kinds); absent is unbounded, and 0 is a bound. A link, a date and one picture take none. |
max | a whole number | no | The upper bound, counted as min is. |
options | a list of options | on a select | The choices, [{"value": "daily", "label": "Täglich"}]. |
of | a list of fields | on a list | A row's fields. A row may hold one list of its own, whose rows hold none. |
client_editable | true or false | no | true: the owner edits it in the panel, and wherever a page draws it the element carries its annotation. Absent is false: the value is the design's. |
accept | image or video | no, on media | What a picture field takes; absent is a photograph. |
multiple | true or false | no, on media | A gallery: a list of pictures, each with its _key. |
ratio | "3:2" | no, on media | The frame the design shows the picture in; the owner's focus says what survives the crop. |
ref | a reference | on a ref | What the value points into — {"to": ["services"], "many": true}. |
no_tap_target | true or false | no | The value is never drawn on the page — a link behind a button, an hour a countdown counts to, a message a script writes later. Edited in the panel beside its field; no annotation is asked of it. A value the page draws is annotated where it is drawn, and is not this. |
beside | a field's key | no, on a no_tap_target field | The field of the same block or row the owner taps to reach this one: the hour beside the date. |
titled_by | a field's key | no | A text field of the same block or row whose words title this value in the panel. |
seo_sensitive | true or false | no | The panel tells the owner a change here changes what search engines read. |
localized | true or false | no, on text, media, url or list | Whether the value is per language, where the kind's own answer is not wanted: true on a photograph with words on it or a link to a page in the language, false on a name never translated (translations). |
role | one of the roles | no, on a field of a shared type | What the field means to the outside world: name, phone, email, street, postal_code, city, region, country, maps, social, price_range, business_type, hours — one field a role. The business's structured data is built from them. |
integer | true or false | no, on number | Whole numbers only — seats, a weight in grams. |
qualifiers | a list of from and on_request | no, on money | What a price may say besides its amount: «from 45.00», «on request». A price so qualified is bookable and not charged online. |
An option
One entry of a select's options.
| key | holds | required | |
|---|---|---|---|
value | a string | yes | What a document holds; its identity, so renaming it is a migration. |
label | words | no | What the panel shows for it; absent shows the value. |
A reference
A ref field's ref.
| key | holds | required | |
|---|---|---|---|
to | a list of collection names | yes | The collections the reference points into. A group or a tree points into one. |
many | true or false | no | Several entries: the value is a list of ids. A resource's does, a post's tags. |
on_delete | restrict or nullify | no | When a named entry is deleted: restrict, the default, asks first, and the deletion takes the id out of every document that names it; nullify takes it out without asking. |
A view
One entry of a block's views — an arrangement its gallery may be shown in.
| key | holds | required | |
|---|---|---|---|
key | a name | yes | The arrangement's name, unique in its block; a block in a document says it as view. |
label | words | yes | What the owner picks the arrangement by. |
min | a whole number | no | The fewest pictures the arrangement holds. |
max | a whole number | no | The most pictures the arrangement holds. |
ratio | "3:2" | no | The frame the arrangement shows its pictures in. |
needs_build | true or false | no | The arrangement cannot be drawn before a build makes it; the panel says the block appears with the next build. |
A form
A block type's form, on a collection's entry type: how the panel lays out one entry's card and a new one. Every key may be left out, and then the panel's own layout stands; anything it cannot draw is refused with JTK_E_PANEL_FORM_INVALID, the rule in the sentence.
json
"form": {
"sections": [
{ "rows": [["title"], ["takes", "costs"], ["about"]] },
{ "title": {"de": "Vor dem Termin", "en": "Before the visit"}, "rows": [[{"field": "patch_test", "span": 2}, "patch_note"]] }
],
"aside": ["photo", "category"],
"widgets": { "takes": "presets", "category": "segmented" }
}The platform draws the rest itself: the card's head with the picture and the switch, the address, the languages, the history, the writing beside the page, each field's label, hint and state. In another language the same layout shows each field's words in that language; a section with none folds into one line.
Lay it out for the eye. What belongs together shares a section, in the order a person fills a new one in. Two short fields share a row; a paragraph, a picture or a list does not share one with a line. Where the controls of a row differ in height, the taller goes left — a link (its two choices, its box and a line under it) before a one-line label, a picture before a caption: the eye expects the bigger one first, and a short control left of a tall one leaves a hole under it.
| key | holds | required | |
|---|---|---|---|
sections | a list of sections | no | The card's sections, in order, at most eight. title stands first where no row names it; a field no row and no aside names is drawn after them, under More (JTK_W_PANEL_FORM_GUESSED), and every required field must have a place — except the fields a module's own card draws, as the shop's product card draws a product's options, variants and Advanced: no form lays those out, and one that places one is advised and left out of it all the same. Absent, the panel's own layout: title (with date beside it), then the fields in their order, short ones two to a row. |
aside | a list of field keys | no | A column beside the sections on a laptop, after them on a phone, at most six: what the entry is at a glance — its picture, its category, a switch. No paragraph, gallery or list. Absent: the type's single pictures; []: none. |
widgets | an object: field key → widget | no | The control a field is written with, one of its kind's (widgets); absent is the kind's own. The same control everywhere the card and a new entry draw the field. |
A form's section
One entry of a form's sections.
| key | holds | required | |
|---|---|---|---|
title | words | no | The section's heading. The first section usually has none. |
note | words | no | One line under the heading: what these fields change on the site. |
rows | a list of rows | yes | Each row a list of one to three cells side by side on a laptop, one under another on a phone; reading order, and the keyboard's, is left to right, then down. A gallery, a list or a document takes a row alone. |
A row's cell
One field of a section's row: its key, or {"field": …, "span": …}.
| key | holds | required | |
|---|---|---|---|
field | a field's key | yes | A field of the entry type, once in the whole form; never body, which is written beside the page. |
span | a whole number, 2–6 | no | How many of the row's six columns the field takes. A cell without one shares what the others leave, evenly; a row spans six at most. A cell may be written as its key alone: "costs" is {"field": "costs"}. |
An upcaster's step
One entry of a block's upcast — what a block written at version from becomes at the next (upcasters). Its changes are made in this order: rename, rows, values, drop, set.
| key | holds | required | |
|---|---|---|---|
from | a whole number | yes | The version the step starts from; it makes a block of that version the next one. One step a version, each below the type's v. |
rename | an object: old key → new key | no | A field called something else. The value moves where the new name says nothing; where both say something, the old one goes to _orphans. |
rows | an object: list key → changes | no | The same changes inside every row of a list — rename, values, drop, set, and rows once more for a list in a row. |
values | an object: field key → old value → new value | no | A select's value renamed: {"material": {"wood": "oak"}}. Renaming an option's value is a migration, and this is it. |
drop | a list of field keys | no | A field that is gone. Its value is kept in _orphans, where nothing is served and nothing is lost. |
set | an object: field key → value | no | A new field's first value, written where the block has none. |
Changes in a list's rows
A step's rows: the changes made in every row of one list.
| key | holds | required | |
|---|---|---|---|
rename | an object: old key → new key | no | As a step's rename, in each row. |
rows | an object: list key → changes | no | The changes inside a list in each row; no deeper. |
values | an object: field key → old value → new value | no | As a step's values, in each row. |
drop | a list of field keys | no | As a step's drop, in each row. |
set | an object: field key → value | no | As a step's set, in each row. |
A collection
One entry of collections — a set of entries the owner creates and the site renders.
| key | holds | required | |
|---|---|---|---|
name | a name | yes | The entries' directory, jtk/entries/<name>/, and the name a module's role and a reference use. Permanent once it has entries. |
label | words | yes | The panel's name for the collection — «Leistungen». |
one | words | no | One entry's name — «Leistung» — where the panel speaks of one. |
intro | words | no | The sentence under the collection's name in the panel: what these are for and where they appear. |
place | business or site | no | Where the owner's panel lists the collection: business, beside the diary and the enquiries, or site, beside the pages. Absent, a collection a module reads sits with the module and the rest with the site. |
icon | lucide:<name> or path:<svg path> | no | The mark beside the collection in the owner's sidebar: any icon of Lucide by its name — lucide:table-2 — or SVG path data on a 20×20 grid for a mark nobody has drawn. |
type | a block type | yes | The entries' own type, whose values an entry keeps under fields. It declares a required text title. |
order | "manual", or an order | no | How the entries are listed. Absent is manual: each entry carries its rank, and the owner moves them. |
group | a field's key | no | A select or a ref of the entry type, by which the panel groups the entries — categories, tags and trees. |
blocks | a list of block types | no | The block types an entry's body may hold, besides its own values. |
untranslated | base or hide | no | What a language with no translation of an entry does: shows the original's words (base, the default), or hides the entry there. hide is refused on a collection a module books (translations). |
route | a route, or "none" | yes | Where the entries are: their own pages and the page that lists them — or "none" for entries shown only on other pages. |
shown_on | a list of addresses with an anchor | with route: "none" | The places an entry appears besides its own page, ["/prices#{slug}"]. The page must exist and render the anchor. |
ends_by | an end by date | no | When the entries are over, by their own date — a party, a course, an offer — and what becomes of one that is: kept for the template to place, or taken off (below). |
A route
A collection's route, where it is not "none". A pattern is written once, or per language as an object of language to pattern; a language the object leaves out takes the site's own language's pattern under its prefix.
| key | holds | required | |
|---|---|---|---|
detail | an address with {slug} | yes | An entry's own page — /works/{slug} — or one per language, {"de": "/werke/{slug}", "en": "/works/{slug}"}. The language's prefix goes in front of it: /en/works/vase. |
listing | an address | no | The page that lists the entries, page one — /works, or one per language. Absent is no listing page. |
per_page | a whole number, 1–200 | no | Paginates the listing; absent is one page. |
An order
A collection's order, where it is not "manual".
| key | holds | required | |
|---|---|---|---|
by | a field's key | yes | A date, a number or a text field of the entry type. |
desc | true or false | no | Largest, latest or last first. |
An end by date
A collection's ends_by: when its entries are over, by a date in their own fields. The structure is the platform's: it works out each entry's moment whenever the entry is written — in the panel, by an import, a copy or a CSV — says «over» in the owner's panel, rebuilds the site at the moment, and the door hands the template ended (and endsAt). What becomes of an entry that is over is the site's, said in then: kept, for the template to place — the next night on the home page, the past ones as an archive — or taken off by the platform.
json
"ends_by": {"date": "date", "time": "starts", "after": 480, "zone": "Europe/Zurich", "then": "keep"}Do not compare an entry's date with today in the template — to choose the next one, to leave the past ones out, to label them: a build freezes that comparison until the next build, a visitor sees a night that is over as ahead, and the panel cannot know. Read ended from the entries the door gives (site.entries(…)); the kit advises JTK_W_DATE_HIDES where a template compares. A countdown in the visitor's browser is drawing, and may stay. An entry that is over and kept owes no place on a page: the template may draw the coming ones only — the next night on the home page — and where it draws one that is over, it annotates it as any. On then: hide the entry's hide_at is the platform's: one in a file is written over by the date at the import, and the panel offers no moment to go.
| key | holds | required | |
|---|---|---|---|
date | a field's key | yes | A date field of the entry type. An entry with no date stays shown. |
time | a field's key | no | A time_of_day field: the moment is the date at that time. Absent is the start of the day. |
after | minutes, 0–10080 | no | How long after that moment the entry goes — 480 is eight hours after the doors open. Absent is none with a time, and the whole day (1440) without one. |
zone | an IANA zone | yes | The clock the date and the time are on — Europe/Zurich, Europe/Kyiv. |
then | keep or hide | no | What becomes of an entry that is over. keep, the default: it stays on the site, and the template places it by ended — an archive of past nights. hide: the platform takes it off — the listing, the feed, the sitemap, a 404 at its address — and its hide_at is the moment. |
An entry's reserved keys
A collection's entry type is one of the schema's own blocks, and five of its keys are spoken for: the listing, the feed, the sitemap, the structured data and the panel's own list of entries all read them by name. Only title has to be declared; the rest are offered, and a type that has no use for one leaves it out. What a type may not do is declare one of these keys as something else — that is refused with JTK_E_COLLECTION_INVALID.
| key | must be | declared | means |
|---|---|---|---|
title | text | yes | What the entry is called: the listing, the admin's list, the feed and the structured data all read it. |
date | date | no | When it was written; what a collection ordered by date is sorted by. A collection ordered by it needs it required, or the order is refused. |
excerpt | textarea | no | The line under the title in a listing and in the feed. |
cover | media | no | The picture a listing shows for it. |
body | markdown | no | The text of the entry itself. |
An entry keeps its own values under fields in its file, jtk/entries/<collection>/<slug>.json, apart from the file's own keys (id, slug, visible…), so a field may take any name — the files under jtk/.
A form's widgets
The controls a form's widgets may choose, by the fields that take them; the first is the kind's own, drawn where none is chosen. The set is closed and the same for every site — a control that is missing is asked for, and the platform builds it for everyone.
| field | widgets | |
|---|---|---|
text | line | one line that wraps |
textarea, richtext_lite | area, tall | tall: a paragraph that opens at ten lines, for a description read whole |
markdown | writing | the document's editor; a row of its own |
number | number, stepper | stepper: − and + around the number, for an integer with min and max at most 50 apart |
money | money | the amount in the site's currency, with from and on request where qualifiers allow them |
duration | minutes, presets | presets: 15, 30, 45, 60, 90 and 120 minutes a tap away, beside the box |
time_of_day | clock | the device's clock |
date | calendar | the panel's calendar |
bool | toggle | yes or no |
select | dropdown, radio, segmented | radio: every choice visible, at most 7; segmented: one row of buttons, at most 4 short ones |
tel, email, url | input | the keyboard for it |
sku | code | monospace |
media | picture | the file and its words; drawn as wide as its place |
media, multiple | gallery | the pictures in order; a row of its own |
list | rows | its rows; a row of its own |
ref | dropdown | the entries by title |
ref, many | checklist | the entries ticked |
What a document is
An entry — a post, a service, a master, a table, a product — is a document: what the business declares about itself. It is edited in the panel, rendered by the site at the addresses the collection gives it, and read by the modules that are pointed at it — the diary reads a service's takes and a master's hours. A document is public-grade by definition: nothing in it is a secret, and nothing in it is about a customer. What happens between the business and a visitor — an enquiry, a booking, an order — is the ledger, kept in the platform's database and never in a document or the repository. A field a page does not draw may still live in a document (a note for the diary); a customer's name never does.
Modules
modules turns a domain of the platform on — bookings — and points it at collections of this schema. Which modules exist, what each reads from an entry and as what kind, and the settings document the owner fills in are in modules.
Worked examples
Each of these is a file in this repository's contract-3 exam, judged by CI on every commit. If one of them is wrong, the build is red before you read it.
the least a schema says
The contract, the site's own language, and one block type with one field. Every other key may be left out; a field the owner edits says client_editable: true as well.
json
{
"contract": 3,
"locale": "de",
"blocks": [
{
"type": "hero",
"v": 1,
"label": "Hero",
"fields": [
{
"key": "title",
"label": "Titel",
"kind": "text"
}
]
}
]
}everything contract 3 adds, said where it may be said
Every word contract 3 has and contract 2 has not, each where it may be said: a variant's sku, its picks and an integer weight in its list's row, a price's qualifiers, options as {value, label}, references {to, many, on_delete}, a list in a row, localized, roles on the shared text, routes written per language, untranslated.
json
{
"contract": 3,
"generator": "test",
"locale": "de",
"locales": [
"en"
],
"blocks": [
{
"type": "product",
"v": 1,
"label": "Produkt",
"fields": [
{
"key": "title",
"label": "Name",
"kind": "text",
"required": true,
"max": 80
},
{
"key": "price",
"label": "Preis",
"kind": "money",
"qualifiers": [
"from",
"on_request"
],
"min": 0
},
{
"key": "colour",
"label": "Farbe",
"kind": "select",
"options": [
{
"value": "red",
"label": {
"de": "Rot",
"en": "Red"
}
},
{
"value": "oak"
}
]
},
{
"key": "category",
"label": "Kategorie",
"kind": "ref",
"ref": {
"to": [
"categories"
],
"on_delete": "nullify"
}
},
{
"key": "related",
"label": "Dazu",
"kind": "ref",
"ref": {
"to": [
"categories",
"tags"
],
"many": true
}
},
{
"key": "photo",
"label": "Bild",
"kind": "media",
"ratio": "3:2",
"localized": true
},
{
"key": "clip",
"label": "Film",
"kind": "media",
"accept": "video"
},
{
"key": "options",
"label": "Optionen",
"kind": "list",
"of": [
{
"key": "name",
"label": "Name",
"kind": "text"
},
{
"key": "values",
"label": "Werte",
"kind": "list",
"of": [
{
"key": "label",
"label": "Wert",
"kind": "text"
}
]
}
]
},
{
"key": "variants",
"label": "Varianten",
"kind": "list",
"of": [
{
"key": "sku",
"label": "Artikelnummer",
"kind": "sku"
},
{
"key": "price",
"label": "Preis",
"kind": "money"
},
{
"key": "weight",
"label": "Gewicht",
"kind": "number",
"integer": true
},
{
"key": "picks",
"label": "Wahl",
"kind": "picks"
}
]
}
]
},
{
"type": "category",
"v": 1,
"label": "Kategorie",
"fields": [
{
"key": "title",
"label": "Name",
"kind": "text",
"required": true
},
{
"key": "parent",
"label": "Oben",
"kind": "ref",
"ref": {
"to": [
"categories"
]
}
}
]
},
{
"type": "tag",
"v": 1,
"label": "Schlagwort",
"fields": [
{
"key": "title",
"label": "Name",
"kind": "text",
"required": true
}
]
},
{
"type": "contacts",
"v": 1,
"label": "Kontakt",
"fields": [
{
"key": "name",
"label": "Name",
"kind": "text",
"role": "name"
},
{
"key": "phone",
"label": "Telefon",
"kind": "tel",
"role": "phone"
},
{
"key": "social",
"label": "Profile",
"kind": "list",
"role": "social",
"of": [
{
"key": "url",
"label": "Adresse",
"kind": "url"
}
]
}
]
}
],
"page_seo": [
{
"key": "title",
"label": "Titel",
"kind": "text",
"localized": true
}
],
"shared": [
"contacts"
],
"collections": [
{
"name": "products",
"label": "Produkte",
"type": "product",
"route": {
"detail": {
"de": "/produkte/{slug}",
"en": "/products/{slug}"
},
"listing": "/produkte",
"per_page": 12
},
"order": {
"by": "title"
},
"group": "category",
"untranslated": "hide"
},
{
"name": "categories",
"label": "Kategorien",
"type": "category",
"route": {
"detail": "/kategorien/{slug}"
},
"order": "manual"
},
{
"name": "tags",
"label": "Schlagworte",
"type": "tag",
"route": "none",
"shown_on": [
"/schlagworte#tag-{slug}",
{
"de": "/start#{slug}",
"en": "/home#{slug}"
}
]
}
]
}a diary whose resources do services by one reference to several
The bookings pointed at two collections: services with no page of their own, shown on the price page by an anchor, and masters with a page each, who say what they do as one reference to several services and how many people fit as a whole number.
json
{
"contract": 3,
"locale": "de",
"blocks": [
{
"type": "service",
"v": 1,
"label": "Leistung",
"fields": [
{
"key": "title",
"label": "Name",
"kind": "text",
"required": true
},
{
"key": "takes",
"label": "Dauer",
"kind": "duration"
},
{
"key": "costs",
"label": "Preis",
"kind": "money",
"qualifiers": [
"from"
]
}
]
},
{
"type": "master",
"v": 1,
"label": "Meisterin",
"fields": [
{
"key": "title",
"label": "Name",
"kind": "text",
"required": true
},
{
"key": "does",
"label": "Macht",
"kind": "ref",
"ref": {
"to": [
"services"
],
"many": true
}
},
{
"key": "seats",
"label": "Plätze",
"kind": "number",
"integer": true
}
]
}
],
"collections": [
{
"name": "services",
"label": "Leistungen",
"type": "service",
"route": "none",
"shown_on": [
"/preise#{slug}"
]
},
{
"name": "masters",
"label": "Team",
"type": "master",
"route": {
"detail": "/team/{slug}",
"listing": "/team"
}
}
],
"modules": {
"bookings": {
"services": "services",
"resources": "masters"
}
}
}an entry laid out for the person who fills it in
A service's form: the name and its category on one row, the length beside the price, the words for the page under a title of their own, the photograph in the aside — and a row of buttons for the category, quick lengths a tap away. The panel draws it on the entry's card and on a new entry; a phone draws each row as one column.
json
{
"contract": 3,
"locale": "de",
"locales": [
"en"
],
"blocks": [
{
"type": "service",
"v": 1,
"label": {
"de": "Leistung",
"en": "Service"
},
"fields": [
{
"key": "title",
"label": "Name",
"kind": "text",
"required": true,
"max": 80,
"client_editable": true
},
{
"key": "category",
"label": {
"de": "Bereich",
"en": "Category"
},
"kind": "select",
"client_editable": true,
"options": [
{
"value": "cut",
"label": {
"de": "Schnitt",
"en": "Cut"
}
},
{
"value": "colour",
"label": {
"de": "Farbe",
"en": "Colour"
}
},
{
"value": "care",
"label": {
"de": "Pflege",
"en": "Care"
}
}
]
},
{
"key": "takes",
"label": {
"de": "Dauer",
"en": "Takes"
},
"kind": "duration",
"required": true,
"client_editable": true
},
{
"key": "costs",
"label": {
"de": "Preis",
"en": "Price"
},
"kind": "money",
"qualifiers": [
"from"
],
"client_editable": true
},
{
"key": "about",
"label": {
"de": "Ein Satz dazu",
"en": "A line about it"
},
"kind": "textarea",
"max": 280,
"client_editable": true
},
{
"key": "photo",
"label": {
"de": "Foto",
"en": "Photograph"
},
"kind": "media",
"ratio": "4:3",
"client_editable": true
}
],
"form": {
"sections": [
{
"rows": [
[
{
"field": "title",
"span": 4
},
"category"
],
[
"takes",
"costs"
]
]
},
{
"title": {
"de": "Auf der Seite",
"en": "On the page"
},
"note": {
"de": "Was die Preisliste zeigt",
"en": "What the price list shows"
},
"rows": [
[
"about"
]
]
}
],
"aside": [
"photo"
],
"widgets": {
"category": "segmented",
"takes": "presets"
}
}
}
],
"collections": [
{
"name": "services",
"label": {
"de": "Leistungen",
"en": "Services"
},
"type": "service",
"route": "none",
"shown_on": [
"/#services-{slug}"
]
}
]
}a type that renamed a field, with the step that brings older content up
A block type at version 2 whose version 1 called the title heading and spelt a value centre: the step from 1 renames both, and a block written at version 1 is read, and saved, as version 2.
json
{
"contract": 3,
"locale": "de",
"blocks": [
{
"type": "hero",
"v": 2,
"label": "Hero",
"fields": [
{
"key": "title",
"label": "Titel",
"kind": "text"
},
{
"key": "align",
"label": "Ausrichtung",
"kind": "select",
"options": [
{
"value": "left"
},
{
"value": "center"
}
]
}
],
"upcast": [
{
"from": 1,
"rename": {
"heading": "title"
},
"values": {
"align": {
"centre": "center"
}
}
}
]
}
]
}Contract 2, the older contract
A site made before contract 3 keeps its schema in jtk/catalogue.json, "contract": 2, and its documents under jtk/content/, until the platform's team moves it with jtk upgrade contract-3 in one commit. Such a tree is judged by contract 2's rules: a key of contract 3's in it is refused as unknown, and a tree with both files is refused. Never start a site there. Its words that contract 3 replaced, and what contract 3 says instead — the sentence the judge answers a jtk/schema.json that still says one:
| contract 2 says | in | contract 3 says |
|---|---|---|
body | a collection | the block types an entry may hold are the collection's blocks |
listing | a collection | the listing is the route's: {"detail": "/works/{slug}", "listing": "/works"} |
pages | a collection | an entry without a page of its own is route "none", with shown_on naming where it is shown |
per_page | a collection | pagination is the route's: {"detail": "/works/{slug}", "listing": "/works", "per_page": 12} |
prefix | a collection | where the entries live is the collection's route: {"detail": "/works/{slug}", "listing": "/works"}, or "none" with shown_on |
deprecated | a field | contract 3 retires a field by removing it, and keeps what it held aside |
option_labels | a field | an option's words are its own label: "options": [{"value": "wood", "label": "Holz"}] |
business_facts | the file | contract 3 has no business facts — the business's own words are shared text, each field saying its role |
country | the file | the country is the payee's own detail, not the schema's |
currency | the file | the currency is the site's setting, not the schema's |
legal_name | the file | the registered name is the payee's own detail, not the schema's |
tax_id | the file | the registration number is the payee's own detail, not the schema's |
sample | a view | contract 3 has no sample — nothing read it |
Besides these: a contract-2 ref names one collection by a string and holds a slug; an option is a string, its words in option_labels; a price is a bare number of minor units; a picture is its key; min or max of 0 means none. The files under jtk/ has contract 2's files.