| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- import { config, fields, collection } from '@keystatic/core';
- export default config({
- storage: {
- kind: 'local',
- },
- collections: {
- posts: collection({
- label: 'Posts',
- slugField: 'title',
- path: 'src/content/posts/*',
- format: { contentField: 'content' },
- schema: {
- title: fields.slug({ name: { label: 'Title' } }),
- link: fields.url({ label: "Link" }),
- content: fields.markdoc({
- label: 'Content',
- }),
- },
- }),
- projects: collection({
- label: 'Projects',
- slugField: 'title',
- path: 'src/content/projects/*',
- format: { contentField: 'content' },
- schema: {
- title: fields.slug({ name: { label: 'Title' } }),
- demo: fields.url({ label: "Demo" }),
- source: fields.url({ label: "Source" }),
- content: fields.markdoc({
- label: 'Content',
- }),
- },
- }),
- about: collection({
- label: 'About',
- slugField: 'name',
- path: 'src/content/about/*',
- format: { contentField: 'content' },
- schema: {
- name: fields.slug({ name: { label: "Name" } }),
- location: fields.text({ label: "Location" }),
- content: fields.markdoc({
- label: 'Content',
- }),
- },
- }),
- contact: collection({
- label: 'Contact',
- slugField: 'title',
- path: 'src/content/contact/*',
- format: { contentField: 'content' },
- schema: {
- title: fields.slug({ name: { label: 'Title' } }),
- email: fields.text({ label: "E-Mail" }),
- content: fields.markdoc({
- label: 'Content',
- }),
- },
- }),
- },
- });
|