Skip to main content

Definition Lists

Definition lists are used to define terms and their corresponding definitions. They are useful for glossaries, FAQs, and other reference material.

An HTML definition list uses <dl> as its container, with <dt> for each term and <dd> for its definition.

<dl>
<dt>Term</dt>
<dd>Definition</dd>
</dl>

To write definition lists without HTML, use the remark-deflist plugin.

First we need to install the plugin.

npm install remark-deflist

Add the plugin to remarkPlugins in docusaurus.config.js.

import remarkDefList from 'remark-deflist';
...
presets: [
[
'@docusaurus/preset-classic',
{
docs: {
remarkPlugins: [
remarkDefList,
],
},
blog: {
remarkPlugins: [
remarkDefList,
],
},
pages: {
remarkPlugins: [
remarkDefList,
],
},
},
],
],

You can now write definition lists in Markdown:

Apple
: Pomaceous fruit of plants of the genus Malus in the family Rosaceae.

Orange
: The fruit of an evergreen tree of the genus Citrus.

Which will render as:

Apple
Pomaceous fruit of plants of the genus Malus in the family Rosaceae.
Orange
The fruit of an evergreen tree of the genus Citrus.