Alinea exports a JavaScript package which allows you to query content.

Content structure

The alinea init command links this package by creating an entry in package.json. It creates the link slightly differently based on the package manager you use:

  "dependencies": {
    "@alinea/content": "file:.alinea"

Yarn is different in that it allows file: packages but does not symlink them. That means content changes are not available until the next yarn install. The other package managers do not support link: so we end up with different ways to install. This should not pose a problem but if you ever switch package manager this link will need to be updated.