A root is the top-level container inside a workspace’s content tree. Every entry in Alinea lives under exactly one root, and every root is identified by the key you give it in theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/alineacms/alinea/llms.txt
Use this file to discover all available pages before exploring further.
roots map of a workspace. Roots control which entry types are allowed as direct children, the sort order displayed in the sidebar, internationalisation locales, and whether the root acts as the workspace’s media library.
Creating a standard root
UseConfig.root(label, options) to create a content root. The label is shown in the dashboard sidebar and the options object accepts a RootMeta descriptor.
cms.ts
Seeding children at creation time
Roots accept an optionalchildren map. Any Page object listed there is seeded into the content tree automatically when Alinea initialises a fresh project. Use Config.page() to create seeded pages (see Types & Fields).
Seeded page inside a root
Internationalisation (i18n) roots
Set thei18n option to enable locale-aware routing. Alinea will create a sub-tree per locale, and every entry inside the root carries a locale field automatically.
i18n root
RootI18n shape only requires one field:
Media root
Every workspace should contain exactly one media root. UseConfig.media() — a convenience function that pre-configures isMediaRoot: true, the media explorer view, and the correct contains list.
Media root
A workspace must have exactly one media root. Alinea will throw an error at
runtime when attempting to resolve an upload destination if no media root is
present.
Config.media() is the recommended way to add one.RootMeta properties
The entry types that can be created as direct children of this root. Each
item is either a
Type reference (the actual object) or a string key
matching a name in the schema. If omitted, the root accepts no children and
acts as a placeholder.Controls the default sort order of child entries in the dashboard sidebar.
Accepts a single
OrderBy expression or an array for multi-key sorting.A React component rendered as the root’s icon in the dashboard sidebar.
Any component that renders an
<svg> works. Alinea ships icon components
under alinea/ui/icons.Enables internationalised content. Provide a
locales array of BCP 47
locale strings. When set, Alinea creates a locale-specific sub-tree for
every locale and adds a locale field to each entry.A path to a React component (e.g.
'./src/CustomRootView.tsx#CustomRootView')
used to render the root’s landing page inside the dashboard. Defaults to the
standard content-tree view.Marks this root as the workspace’s media library. Set automatically when
using
Config.media(). Only one root per workspace should have this flag.A root-level preview configuration that overrides the workspace-level
preview setting for all entries inside this root.