Skip to content

Commit

Permalink
Tag grouping in API docs (#512)
Browse files Browse the repository at this point in the history
* Use the same tag grouping in API docs as in the old docs / Fixup endpoint method colors

* Update api.scss

* Update api.scss

* Update api.scss

* Update api.scss
  • Loading branch information
z4kn4fein authored Dec 11, 2024
1 parent 0dd949b commit 3f7a235
Show file tree
Hide file tree
Showing 5 changed files with 901 additions and 205 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 3f7a235

Please # to comment.