A document's metadata is the map of attributes its Changes set with SetAttributes, merged last-writer-wins per key path. The map is open. Beside the keys listed here a document may carry any custom attribute, and a typed document binds a schema that describes those custom keys. Values are the four scalar values or nested maps of them.
Any other key is allowed; its value is a value.
The keys Seed understands
key | type | meaning |
|---|---|---|
| string | the document or space title |
| string | a short description shown in previews and cards |
|
| a square document or space image |
|
| a wide cover image shown in headers and cards |
|
| deprecated image field kept for older documents; use |
| URL | the web address a space is published at; set on the home document when a site is registered, see Sites |
| URL | the agents server a space advertises to its readers (an http(s) origin); clients viewing the space connect to it beside their own servers, see Environments |
| map | the agents the space publishes to readers, as |
| string | the publication date shown to readers, when it differs from the change history |
| string | an author byline shown to readers |
| boolean | whether to show the document outline |
| boolean | whether to show the document's activity and tools |
|
| the width of the content column |
| string | the layout of the root-level blocks, a children type |
|
| a legacy space header layout |
| map | visual settings for a space; |
|
| a logo shown in the space header |
|
| a legacy ordering of a space's home listing |
| string | comma-separated categories kept from an external import such as WordPress |
| string | comma-separated tags kept from the same import |
Three keys bind a document to Hypermedia Schemas. Typed documents explains them in full.
key | on which document | meaning |
|---|---|---|
| a type's home page | this document defines a schema: |
| an instance | the attributes schema this document conforms to: the type page's |
| a folder | the attributes schema this document's children conform to |
Older documents may still carry title (now name), and old profiles alias and description (now summary). Readers map them. The daemon also keeps internal keys prefixed $db. (the redirect, visibility and derived fields) and strips them from the metadata it serves. A site's navigation menu lives in a detached block, outside the metadata; see navigation item.
Working with metadata
In the Seed app the Attributes tab edits every key, with the required fields of a bound schema pinned at the top. The CLI sets keys with document create --metadata and with the frontmatter of a markdown file, which lists every key in a fixed order. The SDK's HMDocumentMetadataSchema parses the known keys and passes the rest through. The Seed API's ResourceMetadata request returns only the metadata, and QueryDocuments filters documents by any key. Agents read hm://…/:attributes and write options.metadata. See the query grammar.
See also
document: the read model metadata belongs to.
SetAttributes: the op that writes metadata.
key-value: one key path and value.
Typed documents: the schema-binding keys.
navigation item: the site menu.
Seed API: ResourceMetadata returns metadata.
Do you like what you are reading? Subscribe to receive updates.
Unsubscribe anytime