Alinea

Content management for the modern web

README

npm install size Open in StackBlitz

Alinea CMS logo


_Current status_: expect alpha software and out of date docs.


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

  1. ```sh
  2. npm install alinea
  3. ```

Initialize alinea's config file

  1. ```sh
  2. npx alinea init
  3. ```

Open the dashboard to have a look around

  1. ```sh
  2. npx alinea serve
  3. ```


Examples



Configure


Configure alinea in alinea.config.tsx

  1. ```tsx
  2. const BlogPost = alinea.type('Blog post', {
  3.   title: alinea.text('Blog entry title'),
  4.   body: alinea.richText('Body text')
  5. })
  6. ```


Query


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

  1. ```tsx
  2. import {initPages} from '@alinea/content/pages'
  3. const pages = initPages()
  4. console.log(
  5.   await pages
  6.     .whereType('BlogPost')
  7.     .where(post => post.author.is('Me'))
  8.     .select(post => ({title: post.title}))
  9. )
  10. ```


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.


Deploy anywhere


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