Alinea

Content management, streamlined
GitHub
754
Created 3 years ago, last commit 13 days ago
11 contributors
2.12k commits
Stars added on GitHub, month by month
0
12
1
2
3
4
5
6
7
8
9
10
11
2023
2024
Stars added on GitHub, per day, on average
Yesterday
=
Last week
0.0
/day
Last month
+0.1
/day
Last 12 months
+0.1
/day
npmPackage on NPM
alinea
1.0.11
Monthly downloads on NPM
12
1
2
3
4
5
6
7
8
9
10
11
2023
2024
README

npm install size

Alinea CMS logo

Alinea is a modern content management system.

  • Content is stored in flat files and committed to your repository
  • Content is easily queryable through an in-memory SQLite database
  • Content is fully typed

Get started

Install Alinea in your project directory

npm install alinea

Initialize Alinea's config file

npx alinea init --next

Open the dashboard to have a look around

npx alinea dev

Start configuring types and fields →

Configure

Configure Alinea in cms.tsx

import {Config, Field} from 'alinea'

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 →

Query

Retrieve content fully-typed and filter, order, limit as needed.
Select only the fields you need.

import {Query} from 'alinea'

console.log(
  await cms.get({
    type: Blog,
    select: {
      title: Blog.title,
      posts: Query.children({
        type: BlogPost,
        select: {
          title: BlogPost.title
        }
      })
    }
  })
)

See the full api →

Content is available during static site generation and when server side querying.
Content is bundled with your code and can be queried with zero network overhead.

How alinea bundles content →

Deploy anywhere

Alinea supports custom backends that can be hosted as a simple Node.js process or on serverless runtimes.

Setup your backend →

How to contribute to this project

Have a question or an idea? Found a bug? Read how to contribute.