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. Have your block source code available in a GitHub repository
  2. Claim your username by signing up at https://blockprotocol.org
  3. Add a JSON file to the hub folder, in a subfolder matching the username you registered in step one, preceded by the @ symbol (e.g. @myusername)
  4. 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.