Skip to main content

custom-links-hook

TL;DR

Integrates the map of links into the header or footer of the documentation.

Integration:

1. Add dependency

yarn add -WD "@docusaurus-tde/custom-links-hook"

custom-links-hook uses the map of links with the following structure:

type linksMap = {
[category: string]: {
title: string;
items: Array<{ label: string; href: string; }>,
}
}

3. Connect the hook

docusaurus-tde.config.js
const linksMap = require('./linksMap')

module.exports = {
hooks: [
['@docusaurus-tde/custom-links-hook', { linksMap }],
]
}

Hook configuration:

type contentHookProps = {
linksMap: linksMap;
viewType?: 'header' | 'footer' // default: 'header'
}