APIDemo

Root

Roots provide the means to organize content hierarchically in a tree. Pages can have subpages, subpages can have subsubpages, etc. A root is where the hierarchy starts.

workspace('My root', {
  icon, contains, i18n
})

Configuration

Icon

An icon can be used to label a root in the sidebar. Must be a react component. You can find icons on https://icones.js.org or install a package such as react-icons (https://react-icons.github.io/react-icons).

Contains

An array of strings containing the names of types that can be created at the root.

// only entries of type Page can be created at the top of the tree
contains: ['Page']

I18n

An object with internationalization configuration. Locales is an array of strings, containing locales described by a key that will show up in the url structure as well.

i18: {
  locales: ['en', 'fr', 'de']
}

Types