|
| 1 | +--- |
| 2 | +title: Adding a Plugin |
| 3 | +description: How to submit a new plugin or theme to the Docusaurus Community Plugin Directory. |
| 4 | +sidebar_position: 1 |
| 5 | +--- |
| 6 | + |
| 7 | +The plugin directory is powered by [`@homotechsual/docusaurus-plugin-showcase`](https://github.com/homotechsual/docusaurus-plugin-showcase). Each entry is a small YAML file in [`data/plugins/`](https://github.com/DocusaurusCommunity/website/tree/main/data/plugins) — one file per plugin. |
| 8 | + |
| 9 | +## Before you submit |
| 10 | + |
| 11 | +- The plugin must be **open source** with a publicly accessible source repository. |
| 12 | +- The plugin must work with a current or recent stable release of Docusaurus. |
| 13 | +- One entry per npm package (or logical plugin unit). |
| 14 | + |
| 15 | +## Create your YAML file |
| 16 | + |
| 17 | +Add a new file to `data/plugins/` named `<author>.<plugin-short-name>.yaml`. Use lowercase letters, numbers, and hyphens only. |
| 18 | + |
| 19 | +```yaml |
| 20 | +# yaml-language-server: $schema=https://docusaurus.community/schema/plugin/1.0.0.json |
| 21 | +id: yourname.plugin-short-name |
| 22 | +name: Your Plugin Name |
| 23 | +description: A one-sentence description of what your plugin does. |
| 24 | +preview: null |
| 25 | +website: https://github.com/yourname/your-plugin |
| 26 | +source: https://github.com/yourname/your-plugin |
| 27 | +author: yourname |
| 28 | +tags: |
| 29 | + - utility |
| 30 | +minimumVersion: null |
| 31 | +status: maintained |
| 32 | +npmPackages: |
| 33 | + - your-npm-package-name |
| 34 | +``` |
| 35 | +
|
| 36 | +### Fields |
| 37 | +
|
| 38 | +| Field | Required | Notes | |
| 39 | +|-------|----------|-------| |
| 40 | +| `id` | Yes | `author.plugin-name` — must be unique | |
| 41 | +| `name` | Yes | Display name shown in the directory | |
| 42 | +| `description` | Yes | Short, one-sentence description | |
| 43 | +| `preview` | Yes | URL to a preview image, or `null` to auto-generate | |
| 44 | +| `website` | Yes | Public website or repository URL | |
| 45 | +| `source` | No | Source code URL (required for acceptance) | |
| 46 | +| `author` | No | Your GitHub username or organisation name | |
| 47 | +| `tags` | No | See [available tags](#tags) below | |
| 48 | +| `minimumVersion` | No | Minimum Docusaurus version, e.g. `3.0.0`, or `null` | |
| 49 | +| `status` | No | `maintained`, `unmaintained`, or `unknown` | |
| 50 | +| `npmPackages` | No | One or more npm package names | |
| 51 | + |
| 52 | +### Tags |
| 53 | + |
| 54 | +`search` · `api` · `utility` · `content` · `theme` · `markdown` · `analytics` · `integration` · `seo` · `editing` · `docusaurus` |
| 55 | + |
| 56 | +## Submit a pull request |
| 57 | + |
| 58 | +1. Fork [`DocusaurusCommunity/website`](https://github.com/DocusaurusCommunity/website) on GitHub. |
| 59 | +2. Add your YAML file to `data/plugins/`. |
| 60 | +3. Open a pull request against the `main` branch. |
| 61 | + |
| 62 | +The CI build will validate your file against the schema. If validation fails, the build output will tell you which field is invalid. |
0 commit comments