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#
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: 1234567Source 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#
Can be a simple URL string or an object with detailed properties. The system can often parse the type from a standard URL string.
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.gitExample: 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-specWeb Links & Support#
These fields provide direct links to important external resources, enhancing user support and community engagement.
Example#
blocklet.yml
homepage: https://www.arcblock.io/
documentation: https://docs.arcblock.io/
community: https://community.arcblock.io/
support: support@arcblock.ioPromotional Assets#
These fields are used to showcase your blocklet in the Blocklet Store, providing users with a visual preview of its features and functionality.
An array of up to 3 URLs for promotional videos. Only YouTube and Vimeo links are supported.
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.pngUsage 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#
Example#
blocklet.yml
# This field is managed by the Blocklet Store
stats:
downloads: 10500
star: 250
purchases: 120With these fields configured, your blocklet is ready for distribution. The next step is to define how it runs.