Plugin Policy
This document defines the approved plugin policy for the Engineering Journal Docusaurus site and the process for adding new plugins or extensions.
Current Approved Plugins
| Plugin | Source | Purpose |
|---|---|---|
@docusaurus/plugin-content-docs | preset-classic | Docs content rendering |
@docusaurus/plugin-content-pages | preset-classic | Static pages |
@docusaurus/plugin-sitemap | preset-classic | Sitemap generation |
@docusaurus/theme-classic | preset-classic | Default theme |
@docusaurus/theme-mermaid | explicit | Mermaid diagram rendering |
@easyops-cn/docusaurus-search-local | explicit | Offline/local full-text search (no external services) |
@docusaurus/plugin-pwa | explicit | Progressive Web App with offline support |
docusaurus-plugin-glossary | explicit | Auto-generated glossary page with inline term tooltips |
| Giscus (via swizzle) | explicit | GitHub Discussions-backed comments on all doc pages |
Plugin Allowlist Policy
Principles
- Minimal surface — only install plugins that solve a problem that cannot be solved with Docusaurus built-ins or existing tooling.
- Active maintenance — plugins must be actively maintained. Abandoned plugins are not approved.
- No vendor lock-in — prefer plugins from the Docusaurus core team over third-party alternatives.
- Build-time only — plugins that run at build time are preferred over runtime plugins that add JavaScript to the deployed site.
Approval Process
To add a new plugin:
- Open an issue with label
type:featureandarea:themeorarea:repo-docs - Document the problem the plugin solves and why built-ins are insufficient
- Link to the plugin's repository and verify it is actively maintained
- Get approval before adding to
website/package.json - Update this document with the new entry
Prohibited
- Plugins that add analytics or tracking without explicit consent
- Plugins that inject third-party scripts into the deployed site
- Plugins with known security vulnerabilities
- Plugins not compatible with the current Docusaurus major version
Extension Guidelines
Adding Mermaid Diagrams
Mermaid is already enabled. Use fenced code blocks with the mermaid language identifier.
Custom CSS
All custom CSS lives in website/src/css/custom.css. Use CSS variables defined in :root and [data-theme="dark"] rather than hardcoded values. Do not add separate CSS files or import external stylesheets.
Custom React Components
Custom components live in website/src/components/. Keep them small and focused. Do not introduce new npm dependencies for components — use what is already available in the Docusaurus ecosystem.
MDX
MDX is supported. Use sparingly — prefer plain Markdown for content that does not require interactivity. MDX components that require heavy JavaScript should be evaluated against the build-time only principle above.
Reviewing This Document
This document should be reviewed when:
- A new plugin is proposed
- A Docusaurus major version upgrade is planned
- An existing plugin is deprecated upstream