Content structure

Alinea generates files on your file system in a few places.

  • Content is published into a directory as JSON files. Note that we're considering making these files more human editable in the future too.

  • Media files are published in two places: a JSON file with metadata is placed with the content and the file itself is placed in a separate directory, typically ./public.

  • A Javascript library is generated inside the .alinea folder which allows us to interact with the content in JavaScript. It is linked via the @alinea/content package name.

// Published content is stored in json files 
// inside the content directory
content
ā”œ data // data root
│ ā”œ index.json
│ ā”œ blog.json
│ ā•° blog
│   ā”œ blog-post.json
│   ā•° another-blog-post.json
ā•° media // media root
  ā”œ image.png.json
  ā•° file.pdf.json

// A folder which is publicly available
public
ā•° media
  ā”œ image.png
  ā•° file.pdf

// The alinea directory exports a Javascript library
// which can be imported from @alinea/content
.alinea
ā”œ ...
ā”œ pages.js
ā”œ schema.js
ā•° backend.js