Index (Metadata)

The <Index /> provides a site-wide list of terms built from the labels listed under the metadata key of the canopy.yml . During the build, every configured collection and manifest is traversed, and the values for each label are organized. The <Index /> then emits a <dl> per label with <dt> for the heading and <dd> rows for every value that appeared anywhere in the corpus. Think of it as a metadata-based analog to a physical volume's index. Every value doubles as a link to /search so readers can jump straight into filtered results for that term.

<Index />
Subject
Afghan Wars
Afghanistan
Afghanistan--Ghaznī
Afghanistan--Kandahār
Afghanistan--Paktīā
Alai Darwaza (Quwwat-ul-Islam Mosque, Delhi, India)
Animal fighting
Anstruther, David, 1750-1825
Antiquities
Arabian Sea
Architecture
Architecture, British colonial
Architecture, Mughal Empire
Armies--Officers
Art
Date
Language
Genre

Usage

All lists

Add the index to any content page to build a dedicated an index of terms across all items in your collections:

content/terms.mdx
---title: Terms--- # Terms A comprehensive index of terms across items in our collections: <Index />

Single list

Optionally, you can render a single label by passing label. This is helpful when you want to highlight one facet beside other narrative copy or define a dedicated page for a specific subset of terms.

content/terms/date.mdx
---title: Dates--- # Dates A comprehensive index of dates across items in our collections: <Index label="Date" />
Date

Limit and Toggle Customizations

By default each list shows up to 15 values before revealing a "Show more" button. You can adjust this limit and customize the button labels for internationalization or tone.

<Index  label="Subject"  limit={50}  expandLabel="Show more subjects"  collapseLabel="Show fewer subjects"/>

API

PropTypeDefaultNotes
labelstringRestrict the index to a single metadata label (case-insensitive match on the configured labels).
metadataarrayglobalOptional override (array of {label, values}) to render a curated subset instead of the full set.
limitnumber15Maximum number of values to show before revealing the toggle inside each <dl>.
expandLabelstringShow moreText for the expand button when additional values are hidden.
collapseLabelstringShow lessText used after expanding the list.
classNamestringExtra classes applied to the wrapping <div>. Each label always renders as its own <dl>.