Skip to content

Commit

Permalink
docs: better navbar labels (#2863)
Browse files Browse the repository at this point in the history
  • Loading branch information
kai687 authored Mar 13, 2024
1 parent 4b03f18 commit abe1e8b
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion website/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,21 @@ function getSpecsForNavBar() {
return getSpecFiles().map((specFile) => {
/** @type {import('@docusaurus/theme-common').NavbarItem} */
return {
label: specFile.fileName,
label: getLabel(specFile.fileName),
href: specFile.route,
className: 'header-restapi',
};
});
}

function getLabel(str) {
const dict = {
abtesting: 'A/B Testing',
'query-suggestions': 'Query Suggestions',
};
return dict[str] || str;
}

/** @type {import('@docusaurus/types').Config} */
(
module.exports = {
Expand Down

1 comment on commit abe1e8b

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.