Submitting Extensions
If you want to submit an extension to extensions.bilup.org, you need to follow these rules:
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
Header
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:
Nameappears on the website and in the gallery. It should be similar to thenamereturned by getInfo().IDmust be exactly the same as theidreturned by getInfo(), and must be lowercase.Descriptionappears on the website and in the gallery.Licensedescribes 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 isMPL-2.0.Byis used to credit the author.Originalis used for extensions based on others' work. They both use the same format:NameorName <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 startornpm run buildto 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
extensionsrepository (this may require you to have permission to commit to theextensionsrepository; 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]).