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.

The shared defaultFilters option works with this preset, the sites preset, and custom showcases. For example, to show maintained plugins and those whose maintenance status is unknown by default:

defaultFilters: { statuses: ['maintained', 'unknown'] },

Default filters apply only when the corresponding filter is absent from the URL. Visitors can change the selection, and a shared URL such as ?status=unmaintained takes precedence.

Selected statuses are always ORed: an item can be maintained or unknown. The OR/AND toggle affects only tags, so visitors can intersect tags without excluding items that match either status.

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
id✓Unique identifier, e.g. author.plugin-name.
name✓Display name shown on the card.
description✓Short description shown on the card.
website✓Primary 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.
tags✓Array of tag keys. Must include at least one value from the list below.
statusOne of the status keys below.
npmPackagesArray of npm package names, used by the demo's runtime version resolver.
minimumVersionMinimum Docusaurus version required, e.g. '3.0.0'.

Tags​

The demo also displays live npm versions, GitHub releases, and default-branch code updates using runtime computed fields backed by a standalone Cloudflare Worker. These fields are opt-in configuration, not automatic network requests made by pluginsPreset.

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.