0.4.5 • Published 10 months ago
meow-cms v0.4.5
Meow-cms
Example config:
import NextCMS from '../../cms'
const CMS = () => (
<NextCMS
{...{
settings: {
backend: {
name: 'github',
repo: 'creativiii/meow-cms',
branch: 'main',
base_url: 'https://sqlite-experiment.vercel.app/',
auth_endpoint: 'api/auth',
},
media_folder: 'public/images',
public_folder: 'images',
collections: [
{
name: 'blog',
label: 'Blog',
folder: '_posts/blog',
create: true,
slug: '{{uuid}}-{{slug}}-{{year}}-{{month}}-{{day}}-{{author}}',
extension: 'md',
fields: [
{
label: 'Title',
name: 'title',
widget: 'string',
required: true,
},
{
label: 'Published',
name: 'published',
widget: 'boolean',
required: true,
},
{
label: 'Post Author',
name: 'author',
widget: 'relation',
collection: 'authors',
value_field: 'name',
display_fields: 'name',
},
{
label: 'Date',
name: 'date',
widget: 'date',
required: true,
},
{
label: 'Datetime',
name: 'datetime',
widget: 'datetime',
required: true,
},
{
label: 'Categories',
name: 'category',
widget: 'relation',
collection: 'categories',
multiple: true,
display_fields: 'name',
value_field: 'name',
},
{
label: 'Featured Image',
name: 'thumbnail',
widget: 'image',
required: false,
},
{ label: 'Body', name: 'body', widget: 'markdown' },
],
blocks: [
{
name: 'ReactComponent',
label: 'My first block',
fields: [
{
name: 'name',
label: 'Name',
type: {
widget: 'string',
},
},
{
name: 'date',
label: 'Date',
type: {
widget: 'date',
},
},
{
name: 'datetime',
label: 'DateTime',
type: {
widget: 'datetime',
},
},
{
name: 'boolean',
label: 'Boolean',
type: {
widget: 'boolean',
},
},
{
name: 'variant',
label: 'Variant',
type: {
widget: 'select',
options: ['option1', 'option2'],
},
},
{
name: 'padding',
label: 'Padding',
type: {
widget: 'select',
options: [4, 8, 12],
},
},
{
name: 'object',
label: 'Object',
type: {
widget: 'json',
},
},
{
name: 'array',
label: 'Array',
type: {
widget: 'json',
},
},
{
name: 'children',
label: 'Content',
type: {
widget: 'markdown',
},
},
],
},
],
},
{
name: 'authors',
label: 'Authors',
folder: '_posts/authors',
create: true,
slug: '{{slug}}',
extension: 'mdx',
fields: [
{
label: 'Name',
name: 'name',
widget: 'string',
required: true,
},
{
label: 'Avatar',
name: 'avatar',
widget: 'image',
required: true,
},
{ label: 'Body', name: 'body', widget: 'markdown' },
],
},
{
name: 'categories',
label: 'Categories',
folder: '_posts/categories',
create: true,
slug: '{{name}}',
extension: 'mdx',
fields: [
{ label: 'Name', name: 'name', widget: 'string' },
{ label: 'Visible', name: 'visible', widget: 'boolean' },
{ label: 'Description', name: 'description', widget: 'markdown' },
],
},
],
},
}}
/>
)
export default CMS
0.4.5
10 months ago
0.4.4
10 months ago
0.4.3
10 months ago
0.4.2
10 months ago
0.4.1
10 months ago
0.4.0
10 months ago
0.3.11
2 years ago
0.3.10
2 years ago
0.3.9
2 years ago
0.3.8
2 years ago
0.3.7
2 years ago
0.3.6
2 years ago
0.3.5
2 years ago
0.3.4
2 years ago
0.3.3
2 years ago
0.3.2
2 years ago
0.3.1
2 years ago
0.3.0
2 years ago
0.2.0
2 years ago
0.1.2
2 years ago
0.1.1
2 years ago
0.1.0
2 years ago
0.0.7
2 years ago
0.0.6
2 years ago
0.0.5
2 years ago
0.0.4
2 years ago
0.0.3
2 years ago
0.0.2
2 years ago
0.0.1
2 years ago