How to Share Object Schemas in Cosmic

Community Articles
Community Articles How to Share Object Schemas in Cosmic

An Object in Cosmic can be a page, a blog post, an author or anything you want it to be. Cosmic gives you the freedom to create and manage content openly and create your own data structure. Each Object allows for the creation of a title, slug, content and Metafields. Metafields are very powerful pieces of custom data that can be added to objects that can be recursively nested. 

Depending on your use case, your Objects' Content Models can become quite robust with metafields. Save time creating new Objects with sharable Object Schemas. Cosmic makes sharing Object Schemas easy. Simply follow these steps: 


How to Share Object Schemas in Cosmic

1. Click "View Schema" on an existing Object and copy the code in the text area.


2. Paste into the Schema area in a new or existing Object.


Make sure that your Schema is a valid JSON Object structure. For example:

{
  "title": "Object Title",
  "content": "

Here is some amazing content.", "metafields": [ { "title": "Headline", "key": "headline", "value": "Amazing Headline", "type": "text" } ] }

This is another great example of Cosmic helping blended teams of developers and content editors build apps faster. With Cosmic, write once and deliver everywhere. 

I hope that you've found this tutorial helpful. If you have questions or comments about Content Editor Features in the Cosmic system, I'd love to hear about them. You can refer to my Cosmic Profile for additional content on how to intuitively navigate the Cosmic Dashboard. 

carson@cosmicjs.com 

You may also like


In this tutorial I'm going to show you how to build a component-based website using Cosmic.
An application for book lovers to view a list of their favorite books.
This is a JAMstack app with the power of Cosmic. In JAmstack, Vue.js is used as Javascript part, Cosmic as API and Nuxt.js as Markup.
Add the power of Algolia search to your Bucket. This Extension enables you to sync your Cosmic Objects with Algolia, making your data searchable. Set up automatic syncing to automatically add / edit / remove content from Algolia. Follow the simple steps below to install and setup Algolia.
This is a quick example to show some of the powerful things you can do with the Cosmic NPM Module. This script will, add a Bucket to your Cosmic account, add an Object Type (Pages) and add a few Pages.
Build a documentation app in a afternoon leveraging the powered of Gatsby and Cosmic.

Get Started with Cosmic

Build personal projects for free. Add your team at unbeatable prices.
Start Building Talk to Sales