Bot releases are visible (Hide)
Published by github-actions[bot] 4 months ago
Published by github-actions[bot] 4 months ago
Published by github-actions[bot] 6 months ago
Published by github-actions[bot] 6 months ago
Published by github-actions[bot] 6 months ago
Published by github-actions[bot] 6 months ago
enableTables
option.Published by github-actions[bot] 6 months ago
Add Edit.link
and Edit.links
to create link values in the Edit api. These
are currently not optimally typed and will be improved in the future.
const imageField = Field.link('Image', {
fields: {
alt: Field.text('Alt text')
}
})
const imageValue = Edit.link(imageField)
.addImage(imageId, {alt: 'An image'})
.value()
Published by github-actions[bot] 6 months ago
Published by github-actions[bot] 7 months ago
Entries in the dashboard sidebar can now be ordered by a field value.
Use the orderChildrenBy
configuration option to set which field to order by.
const Type = Config.type('Type', {
orderChildrenBy: Query.title.asc() // Order by Entry title
// ...
})
Add subscript and superscript options to rich text Fields.
Stop using the porter stemming FTS5 tokenizer in search queries. The algorithm
does not work well with non-english languages and so is not a good default.
Fix select box not showing a checkmark in the explorer while replacing file or
image links.
Unset validation errors when fields are no longer used.
Published by github-actions[bot] 8 months ago
Published by github-actions[bot] 8 months ago
Published by github-actions[bot] 8 months ago
Published by github-actions[bot] 8 months ago
Published by github-actions[bot] 8 months ago
Reserve Alinea generated properties (#378)
Until now Alinea generated properties that define the content structure as
normal identifiers. This means that in a list a row would contain a "type",
"id" and "index" property while also containing user defined fields. This
had a lot of potential for name clashes: you could choose to name a field
"type" for example. It is also not future-proof as Alinea might want to add
more properties later on. To solve this issue Alinea now reserves all
properties starting with an underscore as internal. It's not needed to
upgrade content files manually. The old format will automatically be picked up
for some time. It's possible to upgrade all files in one go by running the
following, which will write any changes in content back to disk.
npx alinea build --fix
When querying content please pay mind that those internal properties are now
accessed by the underscored property and will need to be updated.
This becomes most apparent in getting results out of the Link field.
const MyType = Config.type('MyType', {
link: Field.link('Link', {
fields: {
label: Field.text('Label')
}
})
})
const result = await cms.get(Query(MyType).select(MyType.link))
// before:
// EntryReference & {label: string}
// ^? {id: string, type: string, ..., url: string, label: string}
// after:
// EntryLink<{label: string}>
// ^? {_id: string, _type: string, ..., url: string, fields: {label: string}}
Use of Type.isContainer is now deprecated, use a list of types in contains
instead.
Use of Type.isHidden is now deprecated, use hidden
instead.
Published by github-actions[bot] 8 months ago
Published by github-actions[bot] 8 months ago
Published by github-actions[bot] 8 months ago
Published by github-actions[bot] 8 months ago
Entry
from alinea/core
which was missing in the previous release.includeSelf
option when querying translations.Published by github-actions[bot] 8 months ago
Two changes that impact how to write config files:
Bundle configuration function in Config
, and fields in a Field
namespace
which is exported from the alinea
package (this is optional).
Deprecate alinea.meta
style configuration.
This change is applied to Schema
(types
), Workspace
(roots
),
Root
(entries
), Type
(fields
), Document
(fields
) and Select
fields (options
).
To upgrade your config files:
// Before
import alinea from 'alinea'
const Type = alinea.type('Name', {
field: alinea.text('Field'),
[alinea.meta]: {
contains: ['Page']
}
})
// After
import {Config, Field} from 'alinea'
const Type = Config.type('Name', {
contains: ['Page'],
fields: {
field: Field.text('Field')
}
})
Add the mutation API (#374)
This introduces a commit method on CMS instances that can be used to mutate
cms content. It can be used to create, update and delete Entries.
Add the Query namespace