Skip to content

Commit f48a48d

Browse files
committed
Update document grouping
1 parent c1d2a09 commit f48a48d

23 files changed

Lines changed: 68 additions & 4 deletions

File tree

app/(home)/[[...slug]]/layout.tsx

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,32 @@ import Pattern from './Pattern';
99
const doscOptions: DocsLayoutProps = {
1010
...baseOptions,
1111
tree: source.pageTree,
12+
sidebar: {
13+
tabs: {
14+
transform(option, node) {
15+
const meta = source.getNodeMeta(node);
16+
if (!meta || !node.icon) return option;
17+
18+
const color = `var(--${meta.path.split('/')[0]}-color, var(--color-fd-foreground))`;
19+
20+
return {
21+
...option,
22+
icon: (
23+
<div
24+
className="[&_svg]:size-4 flex items-center justify-center rounded-lg size-full text-(--tab-color) max-md:bg-(--tab-color)/10 max-md:border max-md:p-1.5"
25+
style={
26+
{
27+
'--tab-color': color,
28+
} as object
29+
}
30+
>
31+
{node.icon}
32+
</div>
33+
),
34+
};
35+
},
36+
},
37+
},
1238
};
1339

1440
export default function Layout({ children }: { children: ReactNode }) {

content/docs/api/meta.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
{
2+
"title": "API Documentation",
3+
"root": true,
4+
"icon": "Shapes",
25
"defaultOpen": true,
36
"pages": ["providers", "clients", "domains", "accesstokens", "tenants", "..."]
47
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"defaultOpen": true
3+
}

content/docs/api/tenants/meta.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"defaultOpen": true
3+
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)