Skip to content

Joseffb/tootyCMS-plugins

Repository files navigation

Tooty CMS Plugins

Default plugin repository for Tooty CMS.

This repo contains official plugins used by Tooty. Community plugins are welcome.

Purpose

  • Provide stable core/site plugin modules
  • Keep plugin behavior behind contracts and capabilities
  • Ensure plugin safety and compatibility in CI

Community Contributions

Community plugins are welcome via pull request.

Before opening a PR, your plugin must pass CI and follow the required rules below.

Plugin Rules (Required)

  1. One folder per plugin at repo root, e.g. my-plugin.
  2. Folder name must match plugin.json.id.
  3. Each plugin must include plugin.json with:
  • id
  • name
  • description
  • version
  • minCoreVersion
  • scope (site|network)
  • distribution (core|community)
  • developer
  • website
  • capabilities
  1. version must be semver-like (example: 0.1.0, 0.2.2-1).
  2. minCoreVersion must match Tooty range format (example: 0.2.x).
  3. website must be an absolute http(s) URL.
  4. If capabilities.hooks = true, include index.mjs.
  5. Add tests/plugin.test.ts.
  6. Do not bypass auth/routing/schema guards.
  7. Do not make direct unsafe side effects outside declared plugin contracts.
  8. No secrets, binaries, malware patterns, or .DS_Store files.

Quick Start: Create a Basic Plugin

  1. Create a folder:
  • my-plugin/
  1. Add my-plugin/plugin.json:
{
  "id": "my-plugin",
  "name": "My Plugin",
  "description": "Minimal Tooty plugin.",
  "version": "0.1.0",
  "minCoreVersion": "0.2.x",
  "scope": "site",
  "distribution": "community",
  "capabilities": {
    "hooks": true,
    "adminExtensions": false,
    "contentTypes": false,
    "serverHandlers": false
  },
  "menu": {
    "label": "My Plugin",
    "path": "/app/plugins/my-plugin"
  },
  "settingsFields": [],
  "developer": "Your Name",
  "website": "https://example.com"
}
  1. Add my-plugin/index.mjs:
export default function registerPlugin(ctx) {
  ctx.hooks?.addAction?.("request:begin", async () => {
    // plugin logic
  });
}
  1. Add my-plugin/tests/plugin.test.ts (minimum contract smoke test).

  2. Validate locally:

npm run ci
  1. Open PR.

CI

This repo runs GitHub Actions for:

  • Plugin contract validation
  • Security scan (secrets + suspicious patterns)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors