0.5.39 • Published 2 months ago

@keystatic/core v0.5.39

Weekly downloads
-
License
MIT
Repository
github
Last release
2 months ago

keystatic

Setup

Create a Next.js app with the following pages

// pages/api/keystatic/[[...params]].tsx
import { makeAPIRouteHandler } from '@keystatic/next/api';

export default makeAPIRouteHandler({});
// pages/keystatic/[[...params]].tsx
import { collection, component, config, fields } from '@keystatic/core';
import { makePage } from '@keystatic/next/ui/pages';

export default makePage(
  config({
    repo: {
      owner: 'github-owner',
      name: 'github-repo-name',
    },
    collections: {
      posts: collection({
        label: 'Posts',
        directory: './somewhere/posts',
        getItemSlug: data => data.slug,
        schema: {
          title: fields.text({ label: 'Title' }),
          slug: fields.text({
            label: 'Slug',
            validation: { length: { min: 4 } },
          }),
          content: fields.document({
            label: 'Content',
            formatting: true,
            dividers: true,
            links: true,
            componentBlocks: {
              something: component({
                label: 'Some Component',
                preview: () => null,
                schema: {},
              }),
            },
          }),
          authors: fields.array(
            fields.object({
              name: fields.text({ label: 'Name' }),
              bio: fields.document({ label: 'Bio' }),
            }),
            { label: 'Authors', itemLabel: props => props.fields.name.value }
          ),
        },
      }),
    },
  })
);
0.5.39

2 months ago

0.5.38

2 months ago

0.5.37

2 months ago

0.5.36

3 months ago

0.5.35

3 months ago

0.5.34

4 months ago

0.5.33

4 months ago

0.5.18

7 months ago

0.5.19

7 months ago

0.5.16

7 months ago

0.5.17

7 months ago

0.5.32

5 months ago

0.5.30

5 months ago

0.5.31

5 months ago

0.5.21

6 months ago

0.5.22

6 months ago

0.5.20

6 months ago

0.5.29

5 months ago

0.5.27

6 months ago

0.5.28

5 months ago

0.5.25

6 months ago

0.5.26

6 months ago

0.5.23

6 months ago

0.5.24

6 months ago

0.5.15

7 months ago

0.5.14

8 months ago

0.5.13

8 months ago

0.5.12

8 months ago

0.5.10

9 months ago

0.5.11

9 months ago

0.5.8

9 months ago

0.5.9

9 months ago

0.5.7

9 months ago

0.5.6

9 months ago

0.5.5

9 months ago

0.5.4

9 months ago

0.5.3

10 months ago

0.5.2

10 months ago

0.5.1

10 months ago

0.5.0

10 months ago

0.4.0

10 months ago

0.3.19

10 months ago

0.3.18

10 months ago

0.3.17

11 months ago

0.3.16

11 months ago

0.3.15

11 months ago

0.3.14

11 months ago

0.3.13

11 months ago

0.3.9

11 months ago

0.3.12

11 months ago

0.3.11

11 months ago

0.3.10

11 months ago

0.3.8

11 months ago

0.3.7

11 months ago

0.3.6

11 months ago

0.3.5

11 months ago

0.3.4

11 months ago

0.3.3

11 months ago

0.3.0

11 months ago

0.3.2

11 months ago

0.3.1

11 months ago

0.2.12

11 months ago

0.2.11

12 months ago

0.2.10

12 months ago

0.2.9

1 year ago

0.2.8

1 year ago

0.2.7

1 year ago

0.2.6

1 year ago

0.2.5

1 year ago

0.0.109

1 year ago

0.0.108

1 year ago

0.0.116

1 year ago

0.0.115

1 year ago

0.0.114

1 year ago

0.0.113

1 year ago

0.0.112

1 year ago

0.0.111

1 year ago

0.0.110

1 year ago

0.1.0

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago

0.1.8

1 year ago

0.1.7

1 year ago

0.1.9

1 year ago

0.1.4

1 year ago

0.1.3

1 year ago

0.1.6

1 year ago

0.1.5

1 year ago

0.2.1

1 year ago

0.2.0

1 year ago

0.2.3

1 year ago

0.2.2

1 year ago

0.2.4

1 year ago

0.0.106

2 years ago

0.0.105

2 years ago

0.0.104

2 years ago

0.0.97

2 years ago

0.0.103

2 years ago

0.0.98

2 years ago

0.0.99

2 years ago

0.0.107

2 years ago

0.0.102

2 years ago

0.0.101

2 years ago

0.0.100

2 years ago

0.0.84

2 years ago

0.0.85

2 years ago

0.0.86

2 years ago

0.0.87

2 years ago

0.0.88

2 years ago

0.0.89

2 years ago

0.0.47

2 years ago

0.0.80

2 years ago

0.0.81

2 years ago

0.0.82

2 years ago

0.0.83

2 years ago

0.0.73

2 years ago

0.0.74

2 years ago

0.0.75

2 years ago

0.0.76

2 years ago

0.0.77

2 years ago

0.0.78

2 years ago

0.0.79

2 years ago

0.0.70

2 years ago

0.0.71

2 years ago

0.0.72

2 years ago

0.0.62

2 years ago

0.0.63

2 years ago

0.0.64

2 years ago

0.0.65

2 years ago

0.0.66

2 years ago

0.0.67

2 years ago

0.0.68

2 years ago

0.0.69

2 years ago

0.0.60

2 years ago

0.0.61

2 years ago

0.0.59

2 years ago

0.0.95

2 years ago

0.0.51

2 years ago

0.0.96

2 years ago

0.0.52

2 years ago

0.0.53

2 years ago

0.0.54

2 years ago

0.0.55

2 years ago

0.0.56

2 years ago

0.0.57

2 years ago

0.0.58

2 years ago

0.0.90

2 years ago

0.0.91

2 years ago

0.0.92

2 years ago

0.0.93

2 years ago

0.0.94

2 years ago

0.0.50

2 years ago

0.0.48

2 years ago

0.0.49

2 years ago

0.0.46

2 years ago

0.0.45

2 years ago

0.0.44

2 years ago

0.0.43

2 years ago

0.0.42

2 years ago

0.0.41

2 years ago

0.0.40

2 years ago

0.0.39

2 years ago

0.0.38

2 years ago

0.0.37

2 years ago