Skip to content

Adding a plugin

Adding a plugin to the wiki takes three things: copy the template folder, fill it in, register the plugin in src/data/plugins.mjs. The sidebar and the plugin cards on the landing page are both built from that list.

The slug is the plugin’s folder name: lowercase, separated by hyphens, for example turtle-pickaxes.

The template lives in templates/plugin/ and is not built into the site. It has one folder per language; copy both (replace turtle-pickaxes with your slug):

Terminal window
cp -r templates/plugin/vi src/content/docs/plugins/turtle-pickaxes
cp -r templates/plugin/en src/content/docs/en/plugins/turtle-pickaxes

On PowerShell:

Terminal window
Copy-Item -Recurse templates/plugin/vi src/content/docs/plugins/turtle-pickaxes
Copy-Item -Recurse templates/plugin/en src/content/docs/en/plugins/turtle-pickaxes

Each copy has the same set of pages: commands, permissions and placeholders. Both languages must have every page.

  1. Replace PLUGIN_NAME with the plugin’s name and SLUG with the slug everywhere in both folders.
  2. Fill in each page from the plugin’s source: plugin.yml, the command classes and the placeholder expansion class.
  3. If the plugin has no placeholders, delete the placeholders page in both languages.
  4. Remove every TODO block you have resolved. Where the source cannot answer a question, keep the TODO block (:::caution[TODO]).

Open src/data/plugins.mjs and add one entry to the plugins array:

export const plugins = [
// ...
{
slug: 'turtle-pickaxes',
name: 'TurtlePickaxes',
description: {
vi: 'Một câu mô tả plugin.',
en: 'One sentence describing the plugin.',
},
},
];

The order of the array is the order in the sidebar and on the landing page. description is the text of the landing-page card; the card opens the plugin’s Commands page. The pages of the sidebar group are discovered from the folder and ordered by sidebar.order in the frontmatter.

Terminal window
npm run build

The build fails on broken links, wrong anchors or a page that exists in only one language (the site’s link validator also catches pages that fall back to the default language).

  • The wiki is a command, permission and placeholder reference for server admins. Do not write installation or configuration guides here.
  • Every command, permission node and placeholder must come from the plugin’s source. Do not invent any. Where the source is silent, leave a visible TODO block.
  • Never put credentials, tokens, webhook URLs, hostnames or IPs, or database passwords in the docs, even if they appear as defaults: use a placeholder such as <db-password>.
  • Do not publish anti-cheat detection thresholds or internals.
  • Do not put roadmaps, plans or internal notes in the docs.
  • Keep technical terms verbatim (commands, permission nodes, placeholders). Write Vietnamese with full diacritics.