Skip to main content

Configuration

Plugin options

OptionTypeDefaultDescription
glossaryPathstring'glossary/glossary.json'Path to the glossary JSON, relative to the site root.
routePathstring'/glossary'URL where the glossary page is served.

Glossary JSON schema

type GlossaryFile = {
title?: string;
description?: string;
terms: Term[];
};

type Term = {
term: string; // required
definition: string; // required
abbreviation?: string; // full form, if `term` is an acronym
relatedTerms?: string[]; // links to other entries by `term`
id?: string; // explicit ID; auto-derived from `term` otherwise
};

Full example

{
"title": "Glossary",
"description": "Technical terms used in our documentation",
"terms": [
{
"term": "API",
"abbreviation": "Application Programming Interface",
"definition": "A set of rules and protocols that allows different software applications to communicate with each other.",
"relatedTerms": ["REST", "GraphQL", "Webhook"]
},
{
"term": "Webhook",
"definition": "An HTTP callback triggered when something happens; a simple event notification via HTTP POST.",
"relatedTerms": ["API", "HTTP"]
}
]
}

Adding the glossary to your navbar

themeConfig: {
navbar: {
items: [
{ to: '/glossary', label: 'Glossary', position: 'left' },
],
},
}