Skip to main content

Plugins preset

The pluginsPreset is pre-configured for a Docusaurus plugin directory. It includes 12 category tags and 3 maintenance statuses out of the box, together with a JSON Schema that validates entries at build time.

Quick start

// docusaurus.config.ts
import showcasePlugin, { type PluginOptions as ShowcasePluginOptions } from '@homotechsual/docusaurus-plugin-showcase'
import { pluginsPreset } from '@homotechsual/docusaurus-plugin-showcase/presets'

export default {
plugins: [
[showcasePlugin, {
...pluginsPreset,
dataDir: 'data/plugins', // relative to your site root
routeBasePath: 'plugins', // served at /plugins
submitUrl: 'https://github.com/your-org/your-repo/discussions/1',
} satisfies ShowcasePluginOptions],
],
}

pluginsPreset provides sensible defaults for every other option. The three fields above are the only ones you need to supply.

YAML format

Create one .yaml file per plugin inside dataDir. Add the language-server comment to get editor autocomplete and inline validation:

# yaml-language-server: $schema=../../../node_modules/@homotechsual/docusaurus-plugin-showcase/schema/plugins-preset/1.0.0.json
id: author.plugin-name
name: My Plugin
description: A useful Docusaurus plugin.
website: https://github.com/author/plugin-name
source: https://github.com/author/plugin-name
author: author
tags:
- utility
status: maintained
npmPackages:
- plugin-name
minimumVersion: '3.0.0'

Fields

FieldRequiredDescription
idUnique identifier, e.g. author.plugin-name.
nameDisplay name shown on the card.
descriptionShort description shown on the card.
websitePrimary link - typically the GitHub repo or npm page.
sourceSource code URL, shown as a "source" button on the card.
previewURL to a preview image. See also co-located images.
authorAuthor name shown on the card.
tagsArray of tag keys. Must include at least one value from the list below.
statusOne of the status keys below.
npmPackagesArray of npm package names (for future use / custom swizzle).
minimumVersionMinimum Docusaurus version required, e.g. '3.0.0'.

Tags

KeyLabelDescription
favouriteFavouriteItems pinned to the "Our favourites" section.
docusaurusDocusaurusCore or official Docusaurus plugins.
searchSearchPlugins implementing search functionality.
apiAPIPlugins for API documentation and testing.
utilityUtilityUtility plugins such as analytics, SASS support, etc.
contentContentPlugins providing content enhancements.
themeThemePlugins implementing themes or significant theme changes.
markdownMarkdownPlugins adding new Markdown features.
analyticsAnalyticsAnalytics integrations (Plausible, Matomo, etc.).
integrationIntegrationPlugins integrating with external services.
seoSEOPlugins implementing SEO improvements.
editingEditingPlugins for editing or contribution workflows.

Statuses

KeyLabelMeaning
maintainedMaintainedCompatible with the latest Docusaurus stable release.
unmaintainedUnmaintainedNot updated for or incompatible with the latest stable release.
unknownUnknownMaintenance status could not be determined.