Customization
Styling with CSS
The plugin uses CSS modules — override specific classes in your site's src/css/custom.css:
/* Auto-linked term underline */
.glossaryTermWrapper .glossaryTerm {
border-bottom-color: var(--ifm-color-primary);
}
/* Hover tooltip */
.glossaryTermWrapper .tooltip {
background: var(--ifm-background-surface-color);
color: var(--ifm-color-content);
}
Swizzling components
For structural changes, swizzleswizzle Docusaurus's mechanism for customizing theme components by ejecting or wrapping them in your project. the components in wrap mode:
npm run swizzle docusaurus-plugin-glossary GlossaryPage -- --wrap
npm run swizzle docusaurus-plugin-glossary GlossaryTerm -- --wrap
This creates src/theme/GlossaryPage/ and src/theme/GlossaryTerm/ shim files you can modify without forking the plugin.
Troubleshooting
- Glossary page 404: check
routePathdoesn't clash with existing routes; runnpm run clearto bust the Docusaurus cache - No auto-linking: make sure you're using the preset, or have the remarkremark A markdown processor. Remark plugins transform the markdown AST before it becomes HTML/JSX. plugin configured in both
docsandpages; clear cache and restart - Tooltips missing: confirm you're on
@docusaurus/core@^3andreact@^18 - "GlossaryTerm not found": the MDXMDX A Markdown-based format that lets you write JSX inside your markdown, used by Docusaurus v3 for docs and pages. is trying to render before the plugin registered its theme — clear cache with
npm run clear