UNPKG

1.95 kBMarkdownView Raw
1[![npm](https://img.shields.io/npm/v/alinea.svg)](https://npmjs.org/package/alinea)
2[![install size](https://packagephobia.com/badge?p=alinea)](https://packagephobia.com/result?p=alinea)
3
4# [![Alinea CMS logo](https://github.com/alineacms/alinea/raw/HEAD/apps/web/public/logo.svg)](https://alinea.sh)
5
6Alinea is a modern content management system.
7
8- Content is stored in flat files and committed to your repository
9- Content is easily queryable through an in-memory SQLite database
10- Content is fully typed
11
12## Get started
13
14Install alinea in your project directory
15
16```sh
17npm install alinea
18```
19
20Initialize alinea's config file
21
22```sh
23npx alinea init --next
24```
25
26Open the dashboard to have a look around
27
28```sh
29npx alinea dev
30```
31
32[Start configuring types and fields →](https://alinea.sh/docs/configuration)
33
34## Configure
35
36Configure alinea in `cms.tsx`
37
38```tsx
39const BlogPost = alinea.type('Blog post', {
40 title: alinea.text('Blog entry title'),
41 body: alinea.richText('Body text')
42})
43```
44
45[Type options and fields →](https://alinea.sh/docs/configuration)
46
47## Query
48
49Retrieve content fully-typed and filter, order, limit and join as needed.
50Select only the fields you need.
51
52```tsx
53import {cms} from '@/cms'
54
55console.log(
56 await cms.find(
57 BlogPost()
58 .where(BlogPost.author.is('Me'))
59 .select({title: BlogPost.title})
60 )
61)
62```
63
64[See the full api →](https://alinea.sh/docs/content/query)
65
66Content is available during static site generation and when server side querying.
67Content is bundled with your code and can be queried with zero network overhead.
68
69[How alinea bundles content →](https://alinea.sh/docs/content)
70
71## Deploy anywhere
72
73Alinea supports custom backends that can be hosted as a simple Node.js process or on serverless runtimes.
74
75[Setup your backend →](https://alinea.sh/docs/deploy)
76
77## How to contribute to this project
78
79Have a question or an idea? Found a bug? Read how to [contribute](contributing.md).