The command (alinea init) we ran in Getting Started created an alinea.config.tsx file. This file contains an example workspace to get started from.
import {
createConfig, MediaSchema, schema, text, type, workspace
} from 'alinea'
import {IcRoundInsertDriveFile} from '@alinea/ui/icons/IcRoundInsertDriveFile'
import {IcRoundPermMedia} from '@alinea/ui/icons/IcRoundPermMedia'
export const config = createConfig({
workspaces: {
main: workspace('Example', {
source: './content',
mediaDir: './public',
schema: schema({
...MediaSchema,
Page: type('Page', {
title: text('Title')
})
}),
roots: {
data: root('Example project', {
icon: IcRoundInsertDriveFile,
contains: ['Page']
}),
media: root('Media', {
icon: IcRoundPermMedia,
contains: ['MediaLibrary']
})
}
})
}
})