Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ordering capabilities for collections #1282

Open
tordans opened this issue Aug 29, 2024 · 0 comments
Open

Ordering capabilities for collections #1282

tordans opened this issue Aug 29, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@tordans
Copy link
Contributor

tordans commented Aug 29, 2024

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 },
    }),
  },
})
@emmatown emmatown added the enhancement New feature or request label Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants