{"_id":"@b-kamphorst/docusaurus-glossary","_rev":"4-f3e2724beb77820cc4029cae5727b1f9","name":"@b-kamphorst/docusaurus-glossary","dist-tags":{"latest":"0.2.1"},"versions":{"0.2.0":{"name":"@b-kamphorst/docusaurus-glossary","version":"0.2.0","keywords":["docusaurus","definitions","dictionary","glossary","terminology","terms"],"author":{"name":"Bart Kamphorst"},"license":"MIT","_id":"@b-kamphorst/docusaurus-glossary@0.2.0","maintainers":[{"name":"b-kamphorst","email":"kamphorstbart+npmjs@gmail.com"}],"dist":{"shasum":"19995d1b045759edcbd9d6bceece4c5575ced43b","tarball":"https://registry.npmjs.org/@b-kamphorst/docusaurus-glossary/-/docusaurus-glossary-0.2.0.tgz","fileCount":24,"integrity":"sha512-+yUTgko4/frYwHHRgn4hjoDF3iSn5Qk5MxXSFJFl/uj+1e4yKwKG+HVadJez6wwsnD64tT7Ox2d5EDU3OVOoMg==","signatures":[{"sig":"MEUCIDLbjCKmViC2BxLKijXn3AGPZGakYwUkzc/XTZnaHAHGAiEAq8Me2+7o+A+9qPqEa9pAK1UskHMaEt6puTHPOAg+OUM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":18730},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","gitHead":"cc0006845c07e169b43967e2a8bdd6ffe7c574bc","_npmUser":{"name":"b-kamphorst","email":"kamphorstbart+npmjs@gmail.com"},"_npmVersion":"11.10.1","description":"Docusaurus plugin and theme to generate and render a glossary from markdown files ('terms'). All references to terms are transformed into tooltips that display short descriptions on hover.","directories":{},"_nodeVersion":"24.13.1","dependencies":{"front-matter":"^4.0.2","react-tooltip":"^5.30.0","unist-util-visit":"^5.1.0"},"_hasShrinkwrap":false,"peerDependencies":{"react":"^18.0.0 || ^19.0.0","react-dom":"^18.0.0 || ^19.0.0","@docusaurus/core":"^3.9.0","@docusaurus/types":"^3.9.0"},"_npmOperationalInternal":{"tmp":"tmp/docusaurus-glossary_0.2.0_1772792944691_0.8026792519801882","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@b-kamphorst/docusaurus-glossary","version":"0.2.1","description":"Docusaurus plugin and theme to generate and render a glossary from markdown files ('terms'). All references to terms are transformed into tooltips that display short descriptions on hover.","main":"./dist/index.js","types":"./dist/index.d.ts","keywords":["docusaurus","definitions","dictionary","glossary","terminology","terms"],"author":{"name":"Bart Kamphorst"},"repository":{"type":"git","url":"git+https://github.com/b-kamphorst/docusaurus-glossary.git"},"license":"MIT","dependencies":{"abstract-syntax-tree":"^2.22.0","front-matter":"^4.0.2","react-tooltip":"^5.30.0","unist-util-visit":"^5.1.0"},"peerDependencies":{"@docusaurus/core":"^3.9.0","@docusaurus/theme-classic":"^3.9.0","@docusaurus/types":"^3.9.0","react":"^18.0.0 || ^19.0.0","react-dom":"^18.0.0 || ^19.0.0"},"gitHead":"a272ffbdf3a1c60725b6f0c415f69690f01b4ff0","_id":"@b-kamphorst/docusaurus-glossary@0.2.1","bugs":{"url":"https://github.com/b-kamphorst/docusaurus-glossary/issues"},"homepage":"https://github.com/b-kamphorst/docusaurus-glossary#readme","_nodeVersion":"24.14.0","_npmVersion":"11.9.0","dist":{"integrity":"sha512-LEmpPbScrLCccUOO7nknCy4z7IId/4qxEa74Wsjp/H1tA2z6dI4iEKGXs57o2WSHq1aK9TgmBItzR47qUDBonw==","shasum":"9b969af4c0a2a33cd03598032f13f1499e075864","tarball":"https://registry.npmjs.org/@b-kamphorst/docusaurus-glossary/-/docusaurus-glossary-0.2.1.tgz","fileCount":22,"unpackedSize":23733,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@b-kamphorst%2fdocusaurus-glossary@0.2.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCICTITo81rVZX0EOXhnBoDw1A5PkSyjpltKtgsH217A3sAiBe+vW3sOQ4xWHQMHks3r/xHPywvT35vrgoKDOElMY+aA=="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:4da96971-28af-4c30-ae6f-393c98dcc982"}},"directories":{},"maintainers":[{"name":"b-kamphorst","email":"kamphorstbart+npmjs@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/docusaurus-glossary_0.2.1_1774178242401_0.15249943679001676"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-06T10:29:04.601Z","modified":"2026-03-22T11:17:22.845Z","0.1.0":"2026-03-06T09:21:35.630Z","0.2.0":"2026-03-06T10:29:04.848Z","0.2.1":"2026-03-22T11:17:22.554Z"},"author":{"name":"Bart Kamphorst"},"license":"MIT","keywords":["docusaurus","definitions","dictionary","glossary","terminology","terms"],"description":"Docusaurus plugin and theme to generate and render a glossary from markdown files ('terms'). All references to terms are transformed into tooltips that display short descriptions on hover.","maintainers":[{"name":"b-kamphorst","email":"kamphorstbart+npmjs@gmail.com"}],"readme":"# 📘 Docusaurus Glossary\n\nA Docusaurus plugin and theme for creating a glossary of terms from Markdown files in your documentation site.\n\nThis project provides a plugin plus accompanying theme that let you define terms in Markdown, automatically process references to those terms, and generate a structured glossary page in your Docusaurus site. It makes it easier for readers to discover and understand important terminology in your documentation.\n\n![Demo of resulting glossary and tooltips](https://github.com/b-kamphorst/docusaurus-glossary/raw/refs/tags/v0.2.1/static/demo.gif)\n\n## 🚀 Features\n\nThis package will:\n\n- collect glossary terms from a directory (`docs/glossary`) of Markdown files;\n- find links to those glossary terms throughout your docs and put them in `Term` components;\n- add a `Glossary` component to `glossary/index.md` that will automatically list and sort all discovered terms;\n- render the above components using the supplied theme;\n- allow you to override (swizzle) this theme if you like.\n\nNotably, this plugin will keep source files intact. All transformations are performed on the docusaurus AST during build by leveraging the remark plugin system.\n\n## Installation\n\nTo install the plugin to your Docusaurus repository, use the command:\n\n```bash\nnpm install @b-kamphorst/docusaurus-glossary\n```\n\nThen add the plugin to `docusaurus.config.js` file of your project:\n\n```js\nimport { remarkGlossary } from \"@b-kamphorst/docusaurus-glossary\";\n\nmodule.exports = {\n  // ...\n  plugins: ['@b-kamphorst/docusaurus-glossary']\n\n  presets: [\n    [\n      \"classic\",\n      {\n        docs: {\n          path: \"docs\",\n          routeBasePath: \"/\",\n          remarkPlugins: [remarkGlossary],\n        },\n        // ...\n      }\n    ],\n  ]\n}\n```\n\nOr, if you need to customize the plugin configuration:\n\n```js\n// in module.exports\nplugins: [\n  '@b-kamphorst/docusaurus-glossary',\n  {\n    // docusaurus plugin options\n  }\n]\n\n// in module.exports.presets.\"classic\".docs\nremarkPlugins: [\n  remarkGlossary, {\n    // remark plugin options\n  }\n],\n```\n\n## Usage\n\nBuild and leverage your own glossary in three simple steps.\n\n### 1. Define a Term\n\nFor every term that you want to refer to, create a markdown file (`.md`, `.mdx`) in the glossary directory. By default, this directory is `docs/glossary`. For example:\n\n`docs/glossary/my-term.md`\n\n```md\n---\ntitle: My term\nhoverText: Short description shows when hovering over links to 'My term'.\n---\n\nLong description will be shown on the dedicated My Term page.\n```\n\n### 2. Initiate a glossary\n\nThis step can be as simple as creating an empty file `docs/glossary/index.md`. It will suffice, and render into a list of all your terms on `http://my-website/glossary`. However, you can add a preamble or custom header if you like:\n\n```md\n---\ntitle: Glossary\n---\n\nThis glossary collects all our terms with a short description in a single overview. Click any term to view a more detailed description.\n```\n\n### 3. Refer to a term\n\nIn any markdown file under `docs/` (including the glossary terms themselves), just link to a term file like you usually do when you refer to another page ([relative and with extension](https://docusaurus.io/docs/markdown-features/links)):\n\n`docs/index.md`\n\n```md\n---\ntitle: Introduction\n---\n\nWelcome to my website! Some hard terms like [\"my term\"](glossary/my-term.md) will be used, but we define them properly for your convenience!\n```\n\n## Options\n\nThis plugin can be customized by providing the options outlined below. An example project that alters the glossary and docs directories can be found in this plugin's repository.\n\n### Docusaurus plugin options\n\n| Option                | Type      | Default         | Description                                                                       |\n| --------------------- | --------- | --------------- | --------------------------------------------------------------------------------- |\n| `path`                | `string`  | `docs/glossary` | Path to the glossary directory relative to `siteDir`. Should be in the docs path. |\n| `throwOnMissingIndex` | `boolean` | `false`         | Throw a build-time error if there exists no glossary index page.                  |\n\n### Remark plugin options\n\n| Option         | Type     | Default    | Description                                         |\n| -------------- | -------- | ---------- | --------------------------------------------------- |\n| `glossaryPath` | `string` | `glossary` | Path to glossary directory relative to `docs.path`. |\n\n## Acknowledgements\n\nThis plugin was inspired by [`grnet`'s docusaurus-terminology](https://github.com/grnet/docusaurus-terminology).\n","readmeFilename":"README.md","homepage":"https://github.com/b-kamphorst/docusaurus-glossary#readme","repository":{"type":"git","url":"git+https://github.com/b-kamphorst/docusaurus-glossary.git"},"bugs":{"url":"https://github.com/b-kamphorst/docusaurus-glossary/issues"}}