Workspaces

Workspaces allow you to structure content into logical categories. For example it is possible to power mutliple websites with a single CMS dashboard by using a workspace per website. Editors can easily switch workspaces in the dashboard.

cms.tsx
export const cms = createCMS({
  workspaces: {
    // Define a main workspace
    main: alinea.workspace('Main workspace', {
      // Define Roots
      pages: alinea.root('Pages'),
      media: alinea.media(),
      // Workspace configuration
      [alinea.meta]: {
        color: '#3F61E8',
        source: 'content',
        mediaDir: 'public'
      }
    })
  }
})

Configuration

Workspaces should be defined in your CMS config.

color

Pick a theme color this workspace.

source

A directory in which published content is stored.

// content is stored in the `content` directory
source: './content'

mediaDir

A directory in which uploaded files are placed. In case you're using Alinea to manage web content this will often point to a directory that is made publicly available so an url can be created to download or display the file.

// uploaded files are placed in the `public` folder
mediaDir: './public'