Skip to main content

custom-links-hook/examples

Displaying a single category in the header:

const linksMap = {
default: {
title: 'Useful links',
items: [
{
label: 'Awesome library',
href: 'https://github.com/reutenkoivan/docusaurus-tde'
}
]
}
}

module.exports = {
hooks: [
['@docusaurus-tde/custom-links-hook', { linksMap }],
]
}
const linksMap = {
useful: {
title: 'Useful links',
items: [
{
label: 'Awesome library',
href: 'https://github.com/reutenkoivan/docusaurus-tde'
}
]
}
}

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

Displaying multiple categories in the header:

const linksMap = {
useful: {
title: 'Useful links',
items: [
{
label: 'Awesome library',
href: 'https://github.com/reutenkoivan/docusaurus-tde'
}
]
},
other: {
title: 'Other links',
items: [
{
label: 'GitHub',
href: 'https://github.com'
}
]
}
}

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