@hashicorp/react-glossary-page

2.5.9 • Public • Published

GlossaryPage

The GlossaryPage component lets you create a specialized glossary view for HashiCorp product docs. Under the hood this component utilizes DocsPage to ensure the layout is consistent with other docs pages.

Example Usage

import GlossaryPage from '@hashicorp/react-glossary-page'
import generateStaticProps from '@hashicorp/react-glossary-page/server'

import order from 'data/docs-navigation.js'
import { productName, productSlug } from 'data/metadata'

export default function GlossaryLayout(staticProps) {
  return (
    <GlossaryPage
      order={order}
      product={{ name: productName, slug: productSlug }}
      staticProps={staticProps}
    />
  )
}

export async function getStaticProps() {
  return generateStaticProps({ productName })
}

To ensure a link appears in the docs navigation, be sure to add an item to the data/docs-navigation.js file. The glossary link should appear at the top-level of the navigation.

{
  title: 'Glossary',
  href: '/docs/glossary',
}

Props

See props.js for more information on props.

Readme

Keywords

none

Package Sidebar

Install

npm i @hashicorp/react-glossary-page

Weekly Downloads

384

Version

2.5.9

License

MPL-2.0

Unpacked Size

38.5 kB

Total Files

9

Last publish

Collaborators

  • abhishek-hashicorp
  • dstaley
  • cameronperera
  • alexju
  • consul-ui-services
  • wenincode-hashicorp
  • hashicb
  • britt.lindgren
  • paulhcp
  • nandereck
  • tstormk
  • hashibot-hds
  • lackeyjb1
  • youriwims
  • jpogran
  • _natmegs
  • thrashr888
  • melsumner
  • mwickett
  • didoo
  • zchsh
  • hcitsec
  • gregone
  • meirish
  • enmod
  • kaxcode
  • anubhavmishra-hashicorp
  • hashibot-web
  • cstitt-hashi
  • kstraut
  • mocohen
  • dhaulagiri