unite cms domain recipes

unite cms comes with a very special feature: Instead of clicking through endless UI to define your content schema, a single JSON document holds all of your config together. Here you find a collection of ready-to-use recipes to start right away.

How to use: Just copy a recipe, create a new domain and paste it in the unite cms domain editor.

How to contribute: Just fork unite-cms/recipes and open a PR.

Media Management

Media Management

A basic media management domain for unite cms. Allows to upload / manage / search images and to create galleries with any number of images.

result

Note about the image field

In order to make image uploading work, you must replace the dummy s3 bucket configiguration with a real bucket. We also created a Tutorial how to set up s3 storage for unite cms.

{
    "title": "Media Management",
    "identifier": "media",
    "variables": {
        "@bucket": {
            "endpoint": "{ENDPOINT}",
            "bucket": "{BUCKET}",
            "key": "{KEY}",
            "secret": "{SECRET}"
        }
    },
    "content_types": [
        {
            "title": "Images",
            "identifier": "images",
            "icon": "image",
            "fields": [
                {
                    "title": "Title",
                    "identifier": "title",
                    "type": "text",
                    "settings": {
                        "not_empty": true
                    }
                },
                {
                    "title": "Image",
                    "identifier": "image",
                    "type": "image",
                    "settings": {
                        "bucket": "@bucket"
                    }
                },
                {
                    "title": "Alternative Text",
                    "identifier": "alt",
                    "type": "textarea",
                    "settings": {
                        "description": "Please give a short description of the image."
                    }
                }
            ],
            "views": [
                {
                    "title": "All",
                    "identifier": "all",
                    "type": "grid",
                    "settings": {
                        "fields": {
                            "image": {
                                "type": "image",
                                "meta": false
                            },
                            "title": {
                                "meta": true
                            },
                            "updated": {
                                "meta": true
                            }
                        }
                    }
                }
            ]
        },
        {
            "title": "Gallary",
            "identifier": "gallary",
            "fields": [
                {
                    "title": "Title",
                    "identifier": "title",
                    "type": "text"
                },
                {
                    "title": "Images",
                    "identifier": "images",
                    "type": "collection",
                    "settings": {
                        "fields": [
                            {
                                "title": "Image",
                                "identifier": "image",
                                "type": "reference",
                                "settings": {
                                    "domain": "media",
                                    "content_type": "images",
                                    "content_label": "{title}"
                                }
                            }
                        ]
                    }
                }
            ]
        }
    ],
    "setting_types": [],
    "domain_member_types": [
        {
            "title": "Editor",
            "identifier": "editor",
            "domain_member_label": "{accessor}",
            "fields": []
        },
        {
            "title": "Viewer",
            "identifier": "viewer",
            "domain_member_label": "{accessor}",
            "fields": []
        }
    ],
    "permissions": {
        "view domain": "true",
        "update domain": "false"
    }
}

Simple Blog

Simple blog

A very simple blog that defins an article content type with an image.

This blog is used in the tutorial: Create a blog using unite cms + vue.js.

result

Note about the image field

In order to make image uploading work, you must replace the dummy s3 bucket configiguration with a real bucket. We also created a Tutorial how to set up s3 storage for unite cms.

{
    "title": "Simple Blog",
    "identifier": "simple_blog",
    "content_types": [
        {
            "title": "Articles",
            "identifier": "articles",
            "content_label": "{headline}",
            "fields": [
                {
                    "title": "Headline",
                    "identifier": "headline",
                    "type": "text"
                },
                {
                    "title": "Image",
                    "identifier": "image",
                    "type": "image",
                    "settings": {
                        "bucket": {
                            "endpoint": "https:\/\/endpoint.example",
                            "bucket": "XXX",
                            "key": "XXX",
                            "secret": "XXX"
                        }
                    }
                },
                {
                    "title": "Content",
                    "identifier": "content",
                    "type": "wysiwyg",
                    "settings": {
                        "heading": [
                            "h2",
                            "h3",
                            "p"
                        ]
                    }
                }
            ],
            "views": [
                {
                    "title": "All",
                    "identifier": "all",
                    "type": "table",
                    "settings": {
                        "fields": {
                            "headline": "Headline",
                            "created": "Created at"
                        }
                    }
                }
            ],
            "permissions": {
                "view content": "true",
                "list content": "true",
                "create content": "member.type == \"editor\"",
                "update content": "member.type == \"editor\"",
                "delete content": "member.type == \"editor\""
            }
        }
    ],
    "setting_types": [
        {
            "title": "Website",
            "identifier": "website",
            "fields": [
                {
                    "title": "Title",
                    "identifier": "title",
                    "type": "text"
                },
                {
                    "title": "Footer Text",
                    "identifier": "footer_text",
                    "type": "wysiwyg"
                },
                {
                    "title": "About Text",
                    "identifier": "about_text",
                    "type": "wysiwyg"
                }
            ],
            "permissions": {
                "view setting": "true",
                "update setting": "member.type == \"editor\""
            }
        }
    ],
    "domain_member_types": [
        {
            "title": "Editor",
            "identifier": "editor",
            "domain_member_label": "{accessor}",
            "fields": []
        },
        {
            "title": "Viewer",
            "identifier": "viewer",
            "domain_member_label": "{accessor}",
            "fields": []
        }
    ],
    "permissions": {
        "view domain": "true",
        "update domain": "false"
    }
}