Added Taxonomy/Author collection
This commit is contained in:
26
src/keystatic/collections/taxonomy/authors.ts
Normal file
26
src/keystatic/collections/taxonomy/authors.ts
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
import { collection, fields } from '@keystatic/core';
|
||||||
|
|
||||||
|
export default collection({
|
||||||
|
label: 'Authors',
|
||||||
|
slugField: 'name',
|
||||||
|
path: 'content/taxonomy/authors/*',
|
||||||
|
format: {
|
||||||
|
data: 'json',
|
||||||
|
},
|
||||||
|
schema: {
|
||||||
|
name: fields.slug({
|
||||||
|
name: {
|
||||||
|
label: 'Name',
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
avatar: fields.image({
|
||||||
|
label: 'Avatar',
|
||||||
|
directory: 'public/images/authors',
|
||||||
|
publicPath: '/images/authors',
|
||||||
|
}),
|
||||||
|
description: fields.text({
|
||||||
|
label: 'Description',
|
||||||
|
multiline: true,
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
});
|
||||||
Reference in New Issue
Block a user