Releases: alineacms/alinea
Releases · alineacms/alinea
v1.0.5
v1.0.4
-
Fix removing field contents in
Edit.update
. Pass anundefined
value to remove
field contents:await cms.commit( Edit.update({ id: '...', set: {removeMe: undefined} }) )
-
Fix processing link data correctly even it contains legacy data
v1.0.3
- Only access normalized config in next cms adapter. This fixes an error
in production builds which would prevent you from querying media files.
v1.0.2
- Tweak the withAlinea config function to work in all environments including
Next 14.
v1.0.1
-
Add the Infer.Entry and Infer.ListItem types which can be used to infer the
type of an entry or list item from a query.type Entry = Infer.Entry<typeof EntryType> const entry: Entry = await cms.get({type: MyType}) type ListItem = Infer.ListItem<typeof ListType> const list: Array<ListItem> = await cms.get({select: MyType.list})
v1.0.0
- Add support for Next.js 15 and Turbopack.
- Removed all previously deprecated options.
- Next.js config changes are now bundled in a
withAlinea
export found in
'alinea/next'. - Querying via
cms.find/get
is rewritten to take a single query object.
Have a look at the docs to see how to use the new query api. - Creating custom fields can now be done through
Field.create
. - Entries now have a single id. If you are upgrading and were using i18n you
can stabilize your ids by runningnpx alinea build --fix
.
v0.11.2
- Querying data in a Next.js edge route or middleware will forward the request
to your CMS handler. This will keep the code size of the edge route to a
minimum.
v0.11.1
- Fix RichTextEditor.addHtml not parsing marks correctly
- Fix index on entry creation
v0.11.0
-
The cms handler has been rewritten to handle both backend and previews. This
requires updating your handler route. In the case of Next.js you can replace
bothapp/api/cms/[...slug]/route.ts
and/app/api/preview.ts
with the
following:// app/api/cms/route.ts import {cms} from '@/cms' import {createHandler} from 'alinea/next' const handler = createHandler(cms) export const GET = handler export const POST = handler
This release also requires you to restructure your Alinea config file.
The dashboard property is replaced by thebaseUrl
,handlerUrl
and
dashboardFile
properties.// cms.tsx // Previously: const cms = createCMS({ // ... schema and workspaces dashboard: { dashboardUrl: '/admin.html', handlerUrl: '/api/cms', staticFile: 'public/admin.html' }, preview: process.env.NODE_ENV === 'development' ? 'http://localhost:3000/api/preview' : '/api/preview' }) // Becomes: const cms = createCMS({ // ... schema and workspaces baseUrl: { // Point this to your local frontend development: 'http://localhost:3000' // If hosting on vercel you can use: process.env.VERCEL_URL production: 'http://example.com' }, handlerUrl: '/api/cms', dashboardFile: 'admin.html', // Optionally supply the public folder with publicDir: 'public', // Enable previews which are handled via handlerUrl preview: true })
v0.10.1
- Use buffer-to-base64 to compress store data written to disk
- Improve live previews, fetch data only when needed