Distribution & Links


This section covers the fields in blocklet.yml that define how your blocklet is packaged for distribution and provide essential links to its source code, homepage, documentation, and other resources. Properly configuring these fields is crucial for discoverability, user trust, and integration into the Blocklet ecosystem.

Distribution Package (dist)#

The dist object contains information about the blocklet's bundled package. This data is typically generated and added automatically by the blocklet publish command and is used by the Blocklet Store to download and verify the blocklet.

It ensures the integrity and authenticity of the blocklet package that users install.

Schema#

dist
object
Contains information about the blocklet's bundled package.
3 subfields

Example#

blocklet.yml

# This field is usually auto-generated during the publish process
dist:
  tarball: https://store.blocklet.dev/uploads/z123abc.tar.gz
  integrity: sha512-Vbf...Q==
  size: 1234567

Source Code Repository (repository)#

The repository field specifies the location of your blocklet's source code. This is highly recommended as it allows users and contributors to review the code, report issues, and contribute.

You can provide a simple URL string or a more detailed object.

Schema#

repository
string | object
Specifies the location of the blocklet's source code.

Can be a simple URL string or an object with detailed properties. The system can often parse the type from a standard URL string.

3 subfields

Example: Simple URL#

If you provide a string, it will be automatically parsed to determine the repository type.

blocklet.yml

repository: https://github.com/arcblock/blocklet-spec.git

Example: Object Format#

Using the object format is useful for monorepos or when you need to be more explicit.

blocklet.yml

repository:
  type: git
  url: https://github.com/arcblock/blocklet-framework.git
  directory: packages/blocklet-spec

These fields provide direct links to important external resources, enhancing user support and community engagement.

homepage
string
The official homepage or marketing page for the blocklet.
documentation
string
A link to the blocklet's detailed documentation site.
community
string
A link to a community forum, Discord server, or other discussion platforms.
support
string
A URL or email address for users to get help.

Example#

blocklet.yml

homepage: https://www.arcblock.io/
documentation: https://docs.arcblock.io/
community: https://community.arcblock.io/
support: support@arcblock.io

Promotional Assets#

These fields are used to showcase your blocklet in the Blocklet Store, providing users with a visual preview of its features and functionality.

screenshots
string[]
An array of URLs pointing to images that showcase the blocklet's UI or features.
videos
string[]

An array of up to 3 URLs for promotional videos. Only YouTube and Vimeo links are supported.

logoUrl
string
A direct URL to the blocklet's logo. This is often generated and uploaded by the publishing process.

Example#

blocklet.yml

screenshots:
  - https://meta.blocklet.dev/screenshots/1.png
  - https://meta.blocklet.dev/screenshots/2.png
videos:
  - https://www.youtube.com/watch?v=xxxxxxxx
logoUrl: https://meta.blocklet.dev/logo.png

Usage Statistics (stats)#

The stats object contains usage metrics for the blocklet. Like the dist field, this is typically managed by the Blocklet Store and should not be set manually.

Schema#

stats
object
Contains usage metrics for the blocklet, managed by the Blocklet Store.
3 subfields

Example#

blocklet.yml

# This field is managed by the Blocklet Store
stats:
  downloads: 10500
  star: 250
  purchases: 120

With these fields configured, your blocklet is ready for distribution. The next step is to define how it runs.