Thinkmill / Thinkmill/keystatic
Ordering capabilities for collections
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.4k
- Forks
- 159
- Avg merge
- 21h 41m
- Merged PRs (30d)
- 2
Description
It would be great to be able to order collections.
The way this could work is: When I add a orderField to my collection, the collection index page shows not only the slugField but also the orderField and allows to drag and drop the order which then updates the data of all relevant content/data files.
Something like this…
export const keystaticHomepageFactsConfig = collection({
label: 'Homepage Fakten-Boxen',
path: 'src/content/homepageFacts/*',
slugField: 'fact',
+ orderField: 'position',
schema: {
position: fields.number({ label: 'Reihenfolge', validation: { isRequired: true } }),
fact: fields.slug({ name: { label: 'Fakt' } }),
factSubline: fields.text({ label: 'Untertitel', validation: { isRequired: true } }),
description: fields.text({
label: 'Untertitel',
multiline: true,
validation: { isRequired: true },
}),
},
})
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the collection configuration and collection index page, since the issue names no files or tests. Confirm how collection data files are written, then consider the work complete when an orderField is shown alongside the slugField, supports drag-and-drop ordering, and persists the new order to all relevant content/data files.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- content
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100