Skip to content

Commit 58feb03

Browse files
committed
feat: enhance layout and standardize code formatting in documentation
- Updated the layout component to include a default open level for the sidebar, improving user navigation. - Standardized trailing commas in various code examples across multiple documentation files for consistency and readability. - Ensured uniformity in code style to enhance overall clarity in documentation.
1 parent a6ea627 commit 58feb03

4 files changed

Lines changed: 23 additions & 17 deletions

File tree

apps/docs/app/docs/layout.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,13 @@ import { baseOptions } from "@/lib/layout.shared";
44

55
export default function Layout({ children }: LayoutProps<"/docs">) {
66
return (
7-
<DocsLayout tree={source.pageTree} {...baseOptions()}>
7+
<DocsLayout
8+
tree={source.pageTree}
9+
{...baseOptions()}
10+
sidebar={{
11+
defaultOpenLevel: 2,
12+
}}
13+
>
814
{children}
915
</DocsLayout>
1016
);

apps/docs/content/docs/sdk/adapters.mdx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ const webhook = github().event("push", async (payload) => {
8787
app.post(
8888
"/webhooks/github",
8989
express.raw({ type: "application/json" }),
90-
toExpress(webhook),
90+
toExpress(webhook)
9191
);
9292

9393
app.listen(3000);
@@ -108,7 +108,7 @@ app.post(
108108
onSuccess: async (eventType) => {
109109
console.log(`Processed ${eventType}`);
110110
},
111-
}),
111+
})
112112
);
113113
```
114114

@@ -127,19 +127,19 @@ const ragieWebhook = ragie().event(
127127
"document_status_updated",
128128
async (payload) => {
129129
// Handle Ragie
130-
},
130+
}
131131
);
132132

133133
app.post(
134134
"/webhooks/github",
135135
express.raw({ type: "application/json" }),
136-
toExpress(githubWebhook),
136+
toExpress(githubWebhook)
137137
);
138138

139139
app.post(
140140
"/webhooks/ragie",
141141
express.raw({ type: "application/json" }),
142-
toExpress(ragieWebhook),
142+
toExpress(ragieWebhook)
143143
);
144144
```
145145

@@ -279,7 +279,7 @@ http(
279279
onSuccess: async (eventType) => {
280280
console.log(`Processed ${eventType}`);
281281
},
282-
}),
282+
})
283283
);
284284
```
285285

@@ -356,7 +356,7 @@ export const POST = toNextJS(webhook, {
356356
app.post(
357357
"/webhooks/github",
358358
express.raw({ type: "application/json" }),
359-
toExpress(webhook, { observer: stats.observer }),
359+
toExpress(webhook, { observer: stats.observer })
360360
);
361361

362362
// NestJS
@@ -369,7 +369,7 @@ http(
369369
"webhookHandler",
370370
toGCPFunction(webhook, {
371371
observer: stats.observer,
372-
}),
372+
})
373373
);
374374
```
375375

apps/docs/content/docs/sdk/providers.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const webhook = github({ secret: process.env.GITHUB_WEBHOOK_SECRET }).event(
2525
"push",
2626
async (payload) => {
2727
console.log(`Push to ${payload.repository.full_name}`);
28-
},
28+
}
2929
);
3030
```
3131

@@ -156,7 +156,7 @@ const webhook = ragie({ secret: process.env.RAGIE_WEBHOOK_SECRET }).event(
156156
"document_status_updated",
157157
async (payload) => {
158158
console.log(`Document ${payload.document_id} is now ${payload.status}`);
159-
},
159+
}
160160
);
161161
```
162162

packages/ragie/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,14 +86,14 @@ const webhook = ragie()
8686
})
8787
.event("connection_sync_started", async (payload) => {
8888
console.log(
89-
`Sync ${payload.sync_id} started for connection ${payload.connection_id}`,
89+
`Sync ${payload.sync_id} started for connection ${payload.connection_id}`
9090
);
9191
});
9292

9393
app.post(
9494
"/webhooks/ragie",
9595
express.raw({ type: "application/json" }),
96-
toExpress(webhook),
96+
toExpress(webhook)
9797
);
9898

9999
app.listen(3000);
@@ -114,7 +114,7 @@ export class WebhooksController {
114114
console.log(`Document ${payload.document_id} is ${payload.status}`);
115115
})
116116
.event("connection_sync_finished", async (payload) => {
117-
console.log(`Sync completed: ${payload.total_creates_count} documents`);
117+
console.log(`Sync completed: ${payload.sync_id}`);
118118
});
119119

120120
@Post("ragie")
@@ -205,10 +205,10 @@ ragie()
205205
console.log(`📊 Sync progress for ${payload.sync_id}`);
206206
console.log(` Created: ${payload.created_count}/${payload.create_count}`);
207207
console.log(
208-
` Content updated: ${payload.updated_content_count}/${payload.update_content_count}`,
208+
` Content updated: ${payload.updated_content_count}/${payload.update_content_count}`
209209
);
210210
console.log(
211-
` Metadata updated: ${payload.updated_metadata_count}/${payload.update_metadata_count}`,
211+
` Metadata updated: ${payload.updated_metadata_count}/${payload.update_metadata_count}`
212212
);
213213
console.log(` Deleted: ${payload.deleted_count}/${payload.delete_count}`);
214214
console.log(` Errors: ${payload.errored_count}`);
@@ -351,7 +351,7 @@ Or pass it explicitly:
351351
// At provider level
352352
const webhook = ragie({ secret: "your-signing-secret" }).event(
353353
"document_status_updated",
354-
handler,
354+
handler
355355
);
356356

357357
// Or at adapter level

0 commit comments

Comments
 (0)