Skip to content

Commit 65413e2

Browse files
authored
Merge pull request #52 from DocusaurusCommunity/develop
feat: plugin submission guide, v1.1.0 upgrade and submit label
2 parents 1201999 + bb2152e commit 65413e2

6 files changed

Lines changed: 77 additions & 14 deletions

File tree

.yarn/install-state.gz

2.01 KB
Binary file not shown.

contributing/customisations.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ We have a customised `DocItem\Footer` component which is the component used to d
3535

3636
### Plugin Directory
3737

38-
The plugin directory is a forked version of the Docusaurus.io showcase plugin. It has been modified to better suit displaying information on Docusaurus plugins. It is currently fed from a static list of plugins in `src/data/plugins.tsx`. This is changing to use a `YAML` file per plugin pulled from `data/plugins` in the future. This will make maintaining the plugin directory easier.
38+
The plugin directory is powered by [`@homotechsual/docusaurus-plugin-showcase`](https://github.com/homotechsual/docusaurus-plugin-showcase). Each plugin is defined as a YAML file in `data/plugins/`. See [Adding a Plugin](/contributing/plugins/) for how to submit a new entry.
3939

4040
## Custom Frontmatter
4141

contributing/plugins.mdx

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
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.

docusaurus.config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,8 @@ const config: Config = {
257257
...pluginsPreset,
258258
dataDir: 'data/plugins',
259259
routeBasePath: 'plugindirectory',
260-
submitUrl: 'https://github.com/homotechsual/docusaurus.community/discussions/3',
260+
submitUrl: '/contributing/plugins/',
261+
submitLabel: 'Add a plugin',
261262
} satisfies ShowcasePresetOptions,
262263
],
263264
[

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"@fortawesome/free-solid-svg-icons": "^7.2.0",
3131
"@fortawesome/react-fontawesome": "^3.3.1",
3232
"@homotechsual/docusaurus-plugin-plausible": "^1.1.1",
33-
"@homotechsual/docusaurus-plugin-showcase": "^1.0.1",
33+
"@homotechsual/docusaurus-plugin-showcase": "1.1.0",
3434
"@iconify/react": "^6.0.2",
3535
"@mdx-js/react": "^3.1.1",
3636
"@popperjs/core": "^2.11.8",
@@ -58,7 +58,7 @@
5858
"@docusaurus/tsconfig": "^3.10.1",
5959
"@docusaurus/types": "^3.10.1",
6060
"@types/jest": "^30.0.0",
61-
"@types/node": "^26.0.0",
61+
"@types/node": "^26.0.1",
6262
"@types/react": "^19.2.17",
6363
"jest": "^30.4.2",
6464
"prettier": "3.8.4",

yarn.lock

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4446,9 +4446,9 @@ __metadata:
44464446
languageName: node
44474447
linkType: hard
44484448

4449-
"@homotechsual/docusaurus-plugin-showcase@npm:^1.0.1":
4450-
version: 1.0.1
4451-
resolution: "@homotechsual/docusaurus-plugin-showcase@npm:1.0.1"
4449+
"@homotechsual/docusaurus-plugin-showcase@npm:1.1.0":
4450+
version: 1.1.0
4451+
resolution: "@homotechsual/docusaurus-plugin-showcase@npm:1.1.0"
44524452
dependencies:
44534453
"@docusaurus/faster": "npm:^3.10.1"
44544454
"@popperjs/core": "npm:^2.11.8"
@@ -4462,7 +4462,7 @@ __metadata:
44624462
"@docusaurus/core": ">=3.0.0 <5.0.0"
44634463
react: ~19.2.7
44644464
react-dom: ~19.2.7
4465-
checksum: 10c0/a5978758080be7eec9037460fdc2f390545ed150eab7f14971b87cc8afb37b09136ab9f6e57ece99d145ec0aea4a514211ce9f28dca0f011163191e23ecd9fca
4465+
checksum: 10c0/fd445e77530327298d39a040d6a95ec78879ee1fc1cf2ebbf27277929754a2b3e9447d22ea75c35b9050d8385d984dde12cce744fb5b21d55037fc9ab7038252
44664466
languageName: node
44674467
linkType: hard
44684468

@@ -6868,12 +6868,12 @@ __metadata:
68686868
languageName: node
68696869
linkType: hard
68706870

6871-
"@types/node@npm:^26.0.0":
6872-
version: 26.0.0
6873-
resolution: "@types/node@npm:26.0.0"
6871+
"@types/node@npm:^26.0.1":
6872+
version: 26.0.1
6873+
resolution: "@types/node@npm:26.0.1"
68746874
dependencies:
68756875
undici-types: "npm:~8.3.0"
6876-
checksum: 10c0/f36e21634fd8e8ded162ca486508bd8bb229d398a8d5541f6d8c1255968d4464e53327a77f403b216ef98e3b6f6956882eef83e4857d4bc2be9569dd55d37aae
6876+
checksum: 10c0/31d204333c70124da6bcac7d1f27d8980149fe3f95a8419bfcd19c3e5823705c0e370d71ac34399352e1263b2d5fc41c87af964ec81e5a05a32224d65d8d224e
68776877
languageName: node
68786878
linkType: hard
68796879

@@ -9836,13 +9836,13 @@ __metadata:
98369836
"@fortawesome/free-solid-svg-icons": "npm:^7.2.0"
98379837
"@fortawesome/react-fontawesome": "npm:^3.3.1"
98389838
"@homotechsual/docusaurus-plugin-plausible": "npm:^1.1.1"
9839-
"@homotechsual/docusaurus-plugin-showcase": "npm:^1.0.1"
9839+
"@homotechsual/docusaurus-plugin-showcase": "npm:1.1.0"
98409840
"@iconify/react": "npm:^6.0.2"
98419841
"@mdx-js/react": "npm:^3.1.1"
98429842
"@popperjs/core": "npm:^2.11.8"
98439843
"@swc/core": "npm:^1.15.43"
98449844
"@types/jest": "npm:^30.0.0"
9845-
"@types/node": "npm:^26.0.0"
9845+
"@types/node": "npm:^26.0.1"
98469846
"@types/react": "npm:^19.2.17"
98479847
"@types/react-dom": "npm:^19.2.3"
98489848
clsx: "npm:^2.1.1"

0 commit comments

Comments
 (0)