Publishing Blocks

Built a block? Share it with the world

Block Hub

Once you've built a block, you can add it to the Block Hub, so that:

  • your block will have an instant online demo playground
  • your block will be searchable via our block API
  • you can claim your namespace in blockprotocol.org

To publish a block on the hub, the initial process is as follows:

  1. Add a JSON file to the hub folder, in a subfolder with the namespace you want to grab, preceded by @ (e.g. @mynamespace)
  2. Create a pull request from your fork

The JSON metadata file should look like this:

{
  // REQUIRED - path to the repository with your block's source code
  repository: "https://github.com/hashintel/dev.git",
  // REQUIRED - name of the branch to build your block from
  branch: "main",
  // REQUIRED - name of the folder your built blocks will appear in after running `yarn build`
  distDir: "dist",
  // OPTIONAL - modify yarn commands
  workspace: "@hashintel/block-embed",
}

We assume that running yarn install && yarn build will create your block's distribution in the specified distDir, unless workspace is provided, in which case we will modify both yarn commands with the provided workspace.

Block API

In January 2022 we'll be launching an API which will allow early users to search available blocks programatically, both my name and by the type of data structures they can display or edit.

If you want to know when the API launches, please register your interest.