Content Modeling


Content modelling gives structure and organization to your content and unlocks some of the powerful tools within Tina Cloud.

In simple terms, content modelling means defining the structure of your content at a granular level. This involves determining what kind of content you need; deciding how it should be structured and defining the required content types and fields. With Tina Cloud, you as the developer are able to outline the content types within your site and the relationships among these types and use these models to build templates for your website. Think of it as breaking down your entire site into smaller, more structural and reusable chunks.

In Tina Cloud, these content models are summed up in YAML files contained within the auto-generated .tina/front_matter/templates folder. An example below shows a Blog Post model.

---
label: Post
fields:
  - name: title
    type: text
    label: Title
  - name: author
    type: author
    label: Author
  - name: body
    type: textarea
    label: Body

A typical Blog Post usually has a title, an author and a body section. To learn more about how to define these types, visit front_matter/templates section of our Docs.

Tina will then automatically generate a schema and types file based on your content model. These two files can be found in the .tina folder. These files are built directly by Tina and thus should not be edited. Tina's GraphQL API will then use the content models that you define to build type-safe Tina forms for editing.