Skip to content

Commit

Permalink
Update readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
benmerckx authored Dec 13, 2024
1 parent 175b27c commit 39903a2
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ Alinea is a modern content management system.

## Get started

Install alinea in your project directory
Install Alinea in your project directory

```sh
npm install alinea
```

Initialize alinea's config file
Initialize Alinea's config file

```sh
npx alinea init --next
Expand All @@ -33,20 +33,21 @@ npx alinea dev

## Configure

Configure alinea in `cms.tsx`
Configure Alinea in `cms.tsx`

```tsx
import {Config, Field} from 'alinea'

const Blog = Config.document('Blog', {
contains: ['BlogPost']
})
const BlogPost = Config.document('Blog post', {
fields: {
title: Field.text('Blog entry title'),
body: Field.richText('Body text')
}
})

const Blog = Config.document('Blog', {
contains: [BlogPost]
})
```

[Type options and fields →](https://alinea.sh/docs/configuration)
Expand Down

0 comments on commit 39903a2

Please sign in to comment.