Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ node_modules
.DS_Store
*.tsbuildinfo
/generated
.next
.next
llms-full.txt
14 changes: 14 additions & 0 deletions build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ const JS_ENTRY = 'js-entry'

const isWindows = process.platform === 'win32'
const prefix = 'alinea/'
const llmsHandbookUrl = 'https://alineacms.com/llms-full.txt'
const llmsHandbookFile = 'llms-full.txt'

const sassCompiler = await sass.initAsyncCompiler()

Expand Down Expand Up @@ -626,6 +628,18 @@ async function build({
test: boolean
report: boolean
}): Promise<void> {
if (!watch) {
const response = await fetch(llmsHandbookUrl)
if (!response.ok) {
throw new Error(
`Failed to refresh ${llmsHandbookFile}: ` +
`${response.status} ${response.statusText}`
)
}
const handbook = await response.text()
fs.writeFileSync(llmsHandbookFile, handbook)
console.info(`Refreshed ${llmsHandbookFile} from ${llmsHandbookUrl}`)
}
const plugins = [
targetPlugin,
cssEntry,
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
}
},
"files": [
"dist"
"dist",
"llms-full.txt"
],
"workspaces": [
"apps/dev",
Expand Down Expand Up @@ -134,4 +135,4 @@
"default": "./dist/picker/url/UrlPicker.js"
}
}
}
}
8 changes: 8 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,14 @@ npx alinea dev

[Start configuring types and fields →](https://alineacms.com/docs/configuration)

## Coding agents

If you are working in a project that depends on `alinea`, read the local handbook at `./llms-full.txt`.

Use that file as additional project context whenever you are asked to generate Alinea schemas, model Alinea content, or produce Alinea-specific code.

If you are working in the alinea repository directly. Make sure you have a local `./llms-full.txt` file to consult, by running bun build.

## Configure

Configure Alinea in `cms.ts`
Expand Down
Loading