Skip to content

Commit

Permalink
Use the same tag grouping in API docs as in the old docs / Fixup endp…
Browse files Browse the repository at this point in the history
…oint method colors
  • Loading branch information
z4kn4fein committed Dec 11, 2024
1 parent 0dd949b commit 5e23eb5
Show file tree
Hide file tree
Showing 5 changed files with 899 additions and 207 deletions.
22 changes: 12 additions & 10 deletions website/api/sidebars.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
import type { SidebarsConfig } from '@docusaurus/plugin-content-docs';

const infoId = 'reference/configcat-public-management-api';

const generated = require('./reference/sidebar.ts')
.slice(1)
.filter(item => item.label != 'Integration links');
.map(item => {
return {
...item,
items: item.items.filter(sub => sub.id !== infoId),
}
});

const sidebars: SidebarsConfig = {
api: [
{
label: 'Public Management API',
collapsed: true,
type: 'category',
link: {
type: "doc",
id: "reference/configcat-public-management-api",
},
items: generated
label: 'Introduction',
type: "doc",
id: infoId,
},
...generated,
],
};

Expand Down
2 changes: 1 addition & 1 deletion website/docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ const config: Config = {
specPath: 'https://api.configcat.com/docs/v1/swagger.json',
outputDir: 'api/reference',
sidebarOptions: {
groupPathsBy: 'tag',
groupPathsBy: 'tagGroup',
categoryLinkSource: 'tag'
},
},
Expand Down
Loading

0 comments on commit 5e23eb5

Please sign in to comment.