Skip to main content

Patterns

What is a Pattern?#

A Pattern is a project schema and optional example content that is made public so anyone can add it to their TakeShape account.

How do I create a Pattern?#

The easiest way is to start with an exported project. You can export a project in the following ways:

What files are in a Pattern?#

schema.json (example)

The heart of the Pattern. This file describes the Shapes (content types) that make up the Pattern.

Schemas may also be defined in yaml with the .yaml or .yml extensions.

pattern.yml (example)

The metadata describing the Pattern. This information will help people know what a Pattern is useful for. The following fields are supported:

  • name (string)
  • description (string)
  • icon (string -- any valid feather icon name)
  • color (string -- a six digit hexadecimal color such as #6235BF)
  • categories (sequence of strings)

Pattern metadata files may also be defined in json with the .json extension.

data.jsonl optional (example)

The optional example content of the Pattern. This content will fit the schema described in schema.json.

roles.yml optional (example)

A file describing roles and permissions for your pattern. This file may be the result of a project export, or a file you author explicitly for your pattern.

This file can also be defined in json with the .json extension.

How do I share a Pattern?#

Using a URL

You can share a pattern by sharing a URL of this format:

https//app.takeshape.io/add-to-takeshape?repo=https://github.com/takeshape/takeshape-samples/tree/master/shape-books

Replace the repo parameter with the URL of your repository.

Using a button in your README

You can also add a nice Deploy To TakeShape button to the README in your repository. Here are the instructions. The button looks like this: