Distribution & Links
This section details the fields in blocklet.yml
that specify how your blocklet is packaged for distribution, where its source code is located, and how users can find related information, documentation, and support channels. These properties are crucial for publishing to a blocklet registry and presenting your blocklet to the community.
Distribution Package (dist
)#
The dist
object contains information about the published tarball of the blocklet. These fields are typically generated and populated automatically by the blocklet publish
command and should not be manually edited.
Field | Type | Description |
---|---|---|
|
| The required URL pointing to the compressed blocklet package ( |
|
| A subresource integrity (SRI) hash of the package. This is used to verify that the downloaded package has not been tampered with. |
|
| (Optional) The size of the |
Example:
dist:
tarball: https://registry.arcblock.io/my-blocklet/-/my-blocklet-1.2.0.tgz
integrity: sha512-AbcDeFgHiJkLmNoPqRsTuVwXyZ...==
size: 2048576
Source Code Repository#
The repository
field specifies the location of the blocklet's source code. This helps users and contributors find the source, report issues, and contribute improvements.
You can specify the repository in two ways:
- Simple String: A direct URL to the repository.
- Object: A detailed object specifying the type, URL, and an optional subdirectory.
The gitHash
field can be used to pinpoint the exact commit the blocklet was built from, which is useful for debugging and ensuring traceability. It is often injected during the CI/CD process.
Field | Type | Description |
---|---|---|
|
| The location of the source code. |
|
| The version control system type (e.g., |
|
| The URL of the repository. |
|
| (Optional) The path to the blocklet within a monorepo. |
|
| (Optional) The git commit hash of the build. |
Example (Simple):
repository: https://github.com/blocklet/my-awesome-blocklet.git
Example (Detailed Object):
repository:
type: git
url: https://github.com/my-org/monorepo.git
directory: packages/my-awesome-blocklet
gitHash: "fdb29c87a389f4648792a47206b97654a321dead"
Informational & Support Links#
These fields provide users with direct links to important resources related to your blocklet.
Field | Type | Description |
---|---|---|
|
| The official homepage for the blocklet. |
|
| A link to the blocklet's primary documentation. |
|
| A URL to a community forum, Discord server, or other discussion platform. |
|
| A URL or an email address for user support. |
|
| The license under which the blocklet is distributed (e.g., "MIT", "Apache-2.0"). |
Example:
homepage: https://my-blocklet.io
documentation: https://docs.my-blocklet.io
community: https://github.com/blocklet/my-awesome-blocklet/discussions
support: support@my-blocklet.io
license: "MIT"
Registry & Store Metadata#
These fields are primarily used for display purposes in blocklet registries and marketplaces. They help showcase your blocklet's features and track its publication history.
Field | Type | Description |
---|---|---|
|
| An array of URLs to images showcasing the blocklet's UI or features. Defaults to an empty array. |
|
| An array of up to 3 URLs to promotional or tutorial videos. Must be valid YouTube or Vimeo links. |
|
| A publicly accessible URL for the blocklet's logo. This is often populated by the registry during publication. |
|
| An ISO 8601 date string indicating when the version was last published. This is set by the registry. |
Example:
screenshots:
- https://cdn.my-blocklet.io/screenshot-1.png
- https://cdn.my-blocklet.io/screenshot-2.png
videos:
- https://www.youtube.com/watch?v=dQw4w9WgXcQ
logoUrl: https://cdn.my-blocklet.io/logo-public.png
After defining your blocklet's distribution and informational links, you need to specify how it runs. Proceed to the Execution & Environment section to learn about configuring the engine, scripts, and environment variables.