Skip to main content

Submitting Extensions

If you want to submit an extension to extensions.bilup.org, you need to follow these rules:

info

Unless it is a high-quality extension, we will not modify the files for you.

Extension Cover Image

Each extension needs a cover image, which is stored in the images/ directory. Additionally, the cover image name must be the same as the extension file name, with dimensions of 600x300 and in .svg format.

Extension File

The header section of the extension must contain the following:

// Name: ExtensionName
// ID: extensionid
// Description: ExtensionDescription
// By: Name <your url>
// Original: TheOriginalAuthor <original url>
// License: MPL-2.0

You must use line comments; block comments /* */ will not work. These fields are required:

  • Name appears on the website and in the gallery. It should be similar to the name returned by getInfo().
  • ID must be exactly the same as the id returned by getInfo(), and must be lowercase.
  • Description appears on the website and in the gallery.
  • License describes the license used for the extension code. It must be a valid SPDX license expression. For our recommended Mozilla Public License 2.0, the identifier is MPL-2.0.
  • By is used to credit the author. Original is used for extensions based on others' work. They both use the same format: Name or Name <Url> (the URL must be valid). If you want to credit multiple authors, simply add another // By: ... or // Original: ... comment.

Code

Before submitting, please ensure your extension code is error-free.

We recommend checking the following:

  • Check if your extension exists in extensions\extensions.json
  • Check if your cover image exists in the images/ directory
  • Run npm start or npm run build to check for build errors

Internationalization Translations

We require your extension to include internationalization translations (zh-CN and en; more languages may be added in the future).

Internationalization translation files are stored in the translations/ directory, where translations\extension-metadata.json stores translations for names and descriptions, and translations\extension-runtime.json stores translations for extension code.

Each translation must follow this format:

"zh-CN": {
"extensionID@translationsID": "value"
}

Where extensionID is your extension's ID, translationsID is the translation key, and value is the translated text.

When using internationalization translations in code, you need to use the Scratch.translate() method.

Scratch.translate({ default: 'defaultValue', id: 'translationsID' });

Generally, defaultValue should contain the English translation.

Note: translationsID is the key you defined earlier in translations\extension-runtime.json. Do not use extensionID@translationsID when calling.

We recommend defining translationsID in a standardized way, such as group.tools, block.settings, etc.

Statement about AI

  • We allow you to use AI to write code, but we recommend that you do not over-rely on AI. If you use AI to write code, please ensure you can understand the code generated by AI and can fix issues without AI.
  • We do not recommend using AI to generate cover images.

Submitting Your Extension

We recommend the following methods for submission:

  • Submit your extension directly to the extensions repository (this may require you to have permission to commit to the extensions repository; we do not recommend this method)
  • Create a branch and submit to that branch (not recommended)
  • Prepare your extension and send it to our maintainers (recommended)

For more details on submitting extensions, please contact us ([email protected]).