A schema is a collection of types.

alinea.schema('My schema', {
  TypeA, TypeB, TypeC


Schemas currently have no configuration options, other than the types.

Example schema

The schema below is a minimal example of a blog setup. It is comprised of two types: BlogOverview and BlogPost. The overview type corresponds to a page that lists the posts. To achieve that it is configured as a container which can hold blog posts as children.

  BlogOverview: alinea.type('Blog overview', {
    title: alinea.text('Title'),
    path: alinea.path('Path')
    isContainer: true,
    contains: ['BlogPost']
  BlogPost: alinea.type('Blog post', {
    title: alinea.text('Title'),
    path: alinea.path('Path'),
    publishDate:'Publish date'),
    body: alinea.richText('Body')