Used to check for browser translation.
用于检测浏览器翻译。
ブラウザの翻訳を検出する
Reference Guides

Adding a component


This document explains how to install Blocklets on your website and details the characteristics, use cases, and important considerations for each installation method.

There are three ways to install a Blocklet:

  1. Install Through the App Store
  2. Install from a URL
  3. Install from Local File

image.png

image.png

1. Install Through the App Store#

This method is the easiest and recommended for new users or those who want to quickly install officially recommended Blocklets.

Procedure:

  1. Click Add Blocklet.
  2. The official Blocklet Store will open in a new window.
  3. Search for the required Blocklet in the Blocklet Store, such as Static Demo and Pages Kit.
  4. Click "Next" to continue the installation.

image.png


2. Install from a URL#

If you already have a valid `blocklet.json` URL, you can install it directly.

Steps:

  1. Select "Add Blocklet from URL".
  2. Enter a valid blocklet.json URL. Alternatively, you can copy the installation URL of a Blocklet from the official Blocklet Store.
  3. After the system verification is successful, click "Next" to continue the installation. The remaining steps are identical to those for a store installation.
  4. Blocklets installed from a URL will have that URL saved and displayed in a dropdown menu, allowing for quick reinstallation and updates.

image.png

⚠️ Note:

  • Ensure the address is accessible.
  • The provided blocklet.json file must adhere to the Blocklet specification; otherwise, installation will fail.


3. Installing from a Local Upload#

This method allows you to directly upload local files, which is suitable for testing Blocklets or using Blocklets that haven't yet been published to the Blocklet Store.

  • Supported File Types:
    • Static files:html, htm
    • Archive format:zip, tgz
  • Upload Requirements
    • Static deployments must include either index.html or index.htm as the entry point.
    • The compressed package can contain either static files or a pre-built Blocklet. The system automatically detects the project type during upload.

The installation process will begin automatically after the upload is complete.

image.png


Mount Points and Override Rules#

After installation, you need to configure a mount point for the Blocklet:

  • Mount Point Definition: The Blocklet's access path within a site, for example:
  • Overriding Rules:
    • If a newly installed Blocklet uses the same mount point as an existing Blocklet, the new content will replace the old content.
    • Identical mount points will only overwrite blocklets installed by uploading. If the mount point is the same as one used by a blocklet installed through other methods, a default mount point will be generated, preventing overwriting.
    • It's recommended to select a unique mount point during installation to prevent conflicts with existing services.
    • Upgrading an installed Blocklet can be done by overwriting its mount point, eliminating the need for uninstallation and reinstallation.

image.png