Skip to content

Commit 4463477

Browse files
committed
docs: comprehensive rewrite (17 pages) + GA, site-verification, favicon/logo, deploy fixes
1 parent c8765bc commit 4463477

21 files changed

Lines changed: 6423 additions & 341 deletions

docs/app/layout.jsx

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,47 @@ import { Head } from 'nextra/components'
33
import { getPageMap } from 'nextra/page-map'
44
import 'nextra-theme-docs/style.css'
55

6+
const GA_ID = 'G-B76YYS1K85'
7+
const basePath = process.env.DOCS_BASE_PATH ?? '/zaileys'
8+
const logoSrc = `${basePath}/zaileys-clean.png`
9+
610
export const metadata = {
711
title: {
812
default: 'Zaileys — Simplified WhatsApp API',
913
template: '%s — Zaileys',
1014
},
1115
description: 'Type-safe, batteries-included WhatsApp bot framework for Node.js / TypeScript built on Baileys.',
16+
icons: { icon: logoSrc, apple: logoSrc },
17+
verification: {
18+
google: 'k0WKK9pKRwONXog26MOpUJG9e3FNniwBf0SaR9OD4pw',
19+
},
1220
}
1321

1422
const navbar = (
15-
<Navbar logo={<b>Zaileys</b>} projectLink="https://github.com/zeative/zaileys" chatLink="https://discord.gg/KBHhTTVUc5" />
23+
<Navbar
24+
logo={
25+
<span style={{ display: 'inline-flex', alignItems: 'center', gap: '0.5rem' }}>
26+
<img src={logoSrc} alt="Zaileys" width={28} height={28} style={{ borderRadius: 6 }} />
27+
<b>Zaileys</b>
28+
</span>
29+
}
30+
projectLink="https://github.com/zeative/zaileys"
31+
chatLink="https://discord.gg/KBHhTTVUc5"
32+
/>
1633
)
1734
const footer = <Footer>MIT {new Date().getFullYear()} © Zaileys.</Footer>
1835

1936
export default async function RootLayout({ children }) {
2037
return (
2138
<html lang="en" dir="ltr" suppressHydrationWarning>
22-
<Head />
39+
<Head>
40+
<script async src={`https://www.googletagmanager.com/gtag/js?id=${GA_ID}`} />
41+
<script
42+
dangerouslySetInnerHTML={{
43+
__html: `window.dataLayer=window.dataLayer||[];function gtag(){dataLayer.push(arguments);}gtag('js',new Date());gtag('config','${GA_ID}');`,
44+
}}
45+
/>
46+
</Head>
2347
<body>
2448
<Layout
2549
navbar={navbar}

docs/content/_meta.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
11
export default {
22
index: 'Introduction',
3+
installation: 'Installation',
34
'getting-started': 'Getting Started',
5+
configuration: 'Configuration',
46
client: 'Client & Lifecycle',
57
events: 'Events',
68
'sending-messages': 'Sending Messages',
9+
media: 'Media Processing',
710
interactive: 'Interactive Messages',
811
'rich-responses': 'Rich Responses (AIRich)',
912
commands: 'Commands',
1013
automation: 'Broadcast & Schedule',
1114
storage: 'Storage Adapters',
15+
'error-handling': 'Error Handling',
1216
runtimes: 'Runtime Support',
17+
troubleshooting: 'Troubleshooting & FAQ',
18+
'api-reference': 'API Reference',
1319
}

docs/content/api-reference.mdx

Lines changed: 334 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)