@heyo-sh/create-heyo-docs 0.2.3 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/deployments/cloudflare/astro/package.json +1 -1
- package/package.json +1 -1
- package/templates/astro/content/api-overview.mdx +20 -0
- package/templates/astro/content/assets/local-architecture.svg +22 -0
- package/templates/astro/content/assets/quick-reference.txt +5 -0
- package/templates/astro/content/changelog.mdx +38 -0
- package/templates/astro/content/configuration.mdx +34 -0
- package/templates/astro/content/essentials/callouts.mdx +16 -18
- package/templates/astro/content/essentials/code-blocks.mdx +7 -15
- package/templates/astro/content/essentials/lists.mdx +9 -13
- package/templates/astro/content/essentials/tables.mdx +7 -14
- package/templates/astro/content/essentials/tabs.mdx +10 -12
- package/templates/astro/content/essentials/text-styling.mdx +14 -21
- package/templates/astro/content/openapi-petstore.json +160 -0
- package/templates/astro/content/openapi.json +278 -0
- package/templates/astro/heyo-docs.config.ts +20 -10
- package/templates/astro/package.json +1 -1
- package/templates/astro/src/components/docs-app.tsx +1 -1
- package/templates/astro/src/layouts/docs-layout.astro +494 -8
- package/templates/astro/src/pages/[...slug].astro +1 -4
- package/templates/astro/src/pages/heyo-docs-internal/ai-chat.ts +20 -0
- package/templates/astro/src/pages/index.astro +13 -0
- package/templates/astro/src/styles/app.css +12 -2
- package/templates/astro/src/virtual.d.ts +7 -0
- package/templates/next/app/[[...slug]]/page.tsx +26 -5
- package/templates/next/app/app.css +12 -2
- package/templates/next/app/components/docs-app.tsx +1 -2
- package/templates/next/app/heyo-docs-internal/ai-chat/route.ts +15 -0
- package/templates/next/app/layout.tsx +411 -0
- package/templates/next/content/api-overview.mdx +20 -0
- package/templates/next/content/assets/local-architecture.svg +22 -0
- package/templates/next/content/assets/quick-reference.txt +5 -0
- package/templates/next/content/changelog.mdx +38 -0
- package/templates/next/content/configuration.mdx +34 -0
- package/templates/next/content/essentials/callouts.mdx +16 -18
- package/templates/next/content/essentials/code-blocks.mdx +7 -15
- package/templates/next/content/essentials/lists.mdx +9 -13
- package/templates/next/content/essentials/tables.mdx +7 -14
- package/templates/next/content/essentials/tabs.mdx +10 -12
- package/templates/next/content/essentials/text-styling.mdx +14 -21
- package/templates/next/content/openapi-petstore.json +160 -0
- package/templates/next/content/openapi.json +278 -0
- package/templates/next/heyo-docs.config.ts +20 -10
- package/templates/react-router/app/app.css +12 -2
- package/templates/react-router/app/root.tsx +412 -1
- package/templates/react-router/app/routes/ai-chat.ts +21 -0
- package/templates/react-router/app/routes/docs.tsx +1 -1
- package/templates/react-router/app/routes/home.tsx +20 -1
- package/templates/react-router/app/routes.ts +1 -0
- package/templates/react-router/app/virtual.d.ts +7 -0
- package/templates/react-router/content/api-overview.mdx +20 -0
- package/templates/react-router/content/assets/local-architecture.svg +22 -0
- package/templates/react-router/content/assets/quick-reference.txt +5 -0
- package/templates/react-router/content/changelog.mdx +38 -0
- package/templates/react-router/content/configuration.mdx +34 -0
- package/templates/react-router/content/essentials/callouts.mdx +16 -18
- package/templates/react-router/content/essentials/code-blocks.mdx +7 -15
- package/templates/react-router/content/essentials/lists.mdx +9 -13
- package/templates/react-router/content/essentials/tables.mdx +7 -14
- package/templates/react-router/content/essentials/tabs.mdx +10 -12
- package/templates/react-router/content/essentials/text-styling.mdx +14 -21
- package/templates/react-router/content/openapi-petstore.json +160 -0
- package/templates/react-router/content/openapi.json +278 -0
- package/templates/react-router/heyo-docs.config.ts +20 -10
- package/templates/astro/content/index.mdx +0 -22
- package/templates/next/content/index.mdx +0 -22
- package/templates/react-router/content/index.mdx +0 -22
|
@@ -18,7 +18,6 @@ import {
|
|
|
18
18
|
} from "react";
|
|
19
19
|
|
|
20
20
|
import { docsConfig, openApiEndpoints, pages } from "../_heyo-docs/content";
|
|
21
|
-
import config from "../../heyo-docs.config";
|
|
22
21
|
import { iconSet } from "../heyo-docs-icons";
|
|
23
22
|
import { useTheme } from "./theme-provider";
|
|
24
23
|
|
|
@@ -119,7 +118,7 @@ export function NextDocsApp({
|
|
|
119
118
|
return (
|
|
120
119
|
<NextNavigationContext.Provider value={navigate}>
|
|
121
120
|
<DocsApp
|
|
122
|
-
config={
|
|
121
|
+
config={docsConfig}
|
|
123
122
|
iconSet={iconSet}
|
|
124
123
|
isDark={mounted ? resolvedTheme === "dark" : undefined}
|
|
125
124
|
link={NextDocsLink}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { createAiChatResponse } from "@heyo-sh/heyo-docs/ai";
|
|
2
|
+
|
|
3
|
+
import config from "../../../heyo-docs.config";
|
|
4
|
+
import { docsPages, markdownPages } from "../../_heyo-docs/server";
|
|
5
|
+
|
|
6
|
+
export const runtime = "nodejs";
|
|
7
|
+
|
|
8
|
+
export async function POST(request: Request) {
|
|
9
|
+
return createAiChatResponse(request, {
|
|
10
|
+
ai: config.ai,
|
|
11
|
+
markdownPages,
|
|
12
|
+
pages: docsPages,
|
|
13
|
+
title: config.title,
|
|
14
|
+
});
|
|
15
|
+
}
|
|
@@ -1,8 +1,68 @@
|
|
|
1
1
|
import type { Metadata } from "next";
|
|
2
2
|
import type { ReactNode } from "react";
|
|
3
|
+
import { adobeAnalyticsScript } from "@heyo-sh/heyo-docs/integrations/analytics/adobe";
|
|
4
|
+
import { amplitudeAnalyticsScript } from "@heyo-sh/heyo-docs/integrations/analytics/amplitude";
|
|
5
|
+
import { clarityBootstrapScript } from "@heyo-sh/heyo-docs/integrations/analytics/clarity";
|
|
6
|
+
import { clearbitAnalyticsScript } from "@heyo-sh/heyo-docs/integrations/analytics/clearbit";
|
|
7
|
+
import { fathomAnalyticsScript } from "@heyo-sh/heyo-docs/integrations/analytics/fathom";
|
|
8
|
+
import {
|
|
9
|
+
googleAnalyticsBootstrapScript,
|
|
10
|
+
googleAnalyticsScript,
|
|
11
|
+
} from "@heyo-sh/heyo-docs/integrations/analytics/google-analytics";
|
|
12
|
+
import {
|
|
13
|
+
googleTagManagerBootstrapScript,
|
|
14
|
+
googleTagManagerNoScriptUrl,
|
|
15
|
+
} from "@heyo-sh/heyo-docs/integrations/analytics/google-tag-manager";
|
|
16
|
+
import { heapBootstrapScript } from "@heyo-sh/heyo-docs/integrations/analytics/heap";
|
|
17
|
+
import { hotjarBootstrapScript } from "@heyo-sh/heyo-docs/integrations/analytics/hotjar";
|
|
18
|
+
import {
|
|
19
|
+
logRocketBootstrapScript,
|
|
20
|
+
logRocketScript,
|
|
21
|
+
} from "@heyo-sh/heyo-docs/integrations/analytics/logrocket";
|
|
22
|
+
import {
|
|
23
|
+
mixpanelBootstrapScript,
|
|
24
|
+
mixpanelScript,
|
|
25
|
+
} from "@heyo-sh/heyo-docs/integrations/analytics/mixpanel";
|
|
26
|
+
import {
|
|
27
|
+
openpanelBootstrapScript,
|
|
28
|
+
openpanelScript,
|
|
29
|
+
} from "@heyo-sh/heyo-docs/integrations/analytics/openpanel";
|
|
30
|
+
import { openReplayBootstrapScript } from "@heyo-sh/heyo-docs/integrations/analytics/openreplay";
|
|
31
|
+
import { osanoConsentScript } from "@heyo-sh/heyo-docs/integrations/consent/osano";
|
|
32
|
+
import {
|
|
33
|
+
transcendConsentScript,
|
|
34
|
+
transcendGoogleConsentModeDefaultsScript,
|
|
35
|
+
} from "@heyo-sh/heyo-docs/integrations/consent/transcend";
|
|
36
|
+
import { pirschAnalyticsScript } from "@heyo-sh/heyo-docs/integrations/analytics/pirsch";
|
|
37
|
+
import { plausibleAnalyticsScript } from "@heyo-sh/heyo-docs/integrations/analytics/plausible";
|
|
38
|
+
import {
|
|
39
|
+
posthogApiHost,
|
|
40
|
+
posthogBootstrapScript,
|
|
41
|
+
posthogScript,
|
|
42
|
+
} from "@heyo-sh/heyo-docs/integrations/analytics/posthog";
|
|
43
|
+
import { rybbitAnalyticsScript } from "@heyo-sh/heyo-docs/integrations/analytics/rybbit";
|
|
44
|
+
import {
|
|
45
|
+
swetrixBootstrapScript,
|
|
46
|
+
swetrixScript,
|
|
47
|
+
} from "@heyo-sh/heyo-docs/integrations/analytics/swetrix";
|
|
48
|
+
import { chaskiqBootstrapScript } from "@heyo-sh/heyo-docs/integrations/support/chaskiq";
|
|
49
|
+
import { chatwootBootstrapScript } from "@heyo-sh/heyo-docs/integrations/support/chatwoot";
|
|
50
|
+
import {
|
|
51
|
+
frontChatBootstrapScript,
|
|
52
|
+
frontChatScript,
|
|
53
|
+
} from "@heyo-sh/heyo-docs/integrations/support/front";
|
|
54
|
+
import { intercomBootstrapScript } from "@heyo-sh/heyo-docs/integrations/support/intercom";
|
|
55
|
+
import { papercupsBootstrapScript } from "@heyo-sh/heyo-docs/integrations/support/papercups";
|
|
56
|
+
import { typebotBootstrapScript } from "@heyo-sh/heyo-docs/integrations/support/typebot";
|
|
57
|
+
import { umamiAnalyticsScript } from "@heyo-sh/heyo-docs/integrations/analytics/umami";
|
|
58
|
+
import {
|
|
59
|
+
zammadBootstrapScript,
|
|
60
|
+
zammadChatScript,
|
|
61
|
+
} from "@heyo-sh/heyo-docs/integrations/support/zammad";
|
|
3
62
|
|
|
4
63
|
import config from "../heyo-docs.config";
|
|
5
64
|
import "./app.css";
|
|
65
|
+
import "./_heyo-docs/theme.css";
|
|
6
66
|
import { ThemeProvider } from "./components/theme-provider";
|
|
7
67
|
import { getThemeScript, THEME_STORAGE_KEY } from "./lib/theme";
|
|
8
68
|
|
|
@@ -42,17 +102,305 @@ export const metadata: Metadata = {
|
|
|
42
102
|
},
|
|
43
103
|
};
|
|
44
104
|
|
|
105
|
+
const osano = config.integrations.consent.osano
|
|
106
|
+
? osanoConsentScript(config.integrations.consent.osano)
|
|
107
|
+
: undefined;
|
|
108
|
+
const transcend = config.integrations.consent.transcend
|
|
109
|
+
? transcendConsentScript(config.integrations.consent.transcend)
|
|
110
|
+
: undefined;
|
|
111
|
+
const transcendGoogleConsentDefaults =
|
|
112
|
+
transcend &&
|
|
113
|
+
(config.integrations.analytics.ga4 || config.integrations.analytics.gtm)
|
|
114
|
+
? transcendGoogleConsentModeDefaultsScript()
|
|
115
|
+
: undefined;
|
|
116
|
+
const adobe = config.integrations.analytics.adobe
|
|
117
|
+
? adobeAnalyticsScript(config.integrations.analytics.adobe)
|
|
118
|
+
: undefined;
|
|
119
|
+
const amplitude = config.integrations.analytics.amplitude
|
|
120
|
+
? amplitudeAnalyticsScript(config.integrations.analytics.amplitude)
|
|
121
|
+
: undefined;
|
|
122
|
+
const clarity = config.integrations.analytics.clarity
|
|
123
|
+
? clarityBootstrapScript()
|
|
124
|
+
: undefined;
|
|
125
|
+
const clearbit = config.integrations.analytics.clearbit
|
|
126
|
+
? clearbitAnalyticsScript(config.integrations.analytics.clearbit)
|
|
127
|
+
: undefined;
|
|
128
|
+
const fathom = config.integrations.analytics.fathom
|
|
129
|
+
? fathomAnalyticsScript(config.integrations.analytics.fathom)
|
|
130
|
+
: undefined;
|
|
131
|
+
const googleAnalytics = config.integrations.analytics.ga4
|
|
132
|
+
? googleAnalyticsScript(config.integrations.analytics.ga4)
|
|
133
|
+
: undefined;
|
|
134
|
+
const googleAnalyticsBootstrap = googleAnalytics
|
|
135
|
+
? googleAnalyticsBootstrapScript()
|
|
136
|
+
: undefined;
|
|
137
|
+
const googleTagManager = config.integrations.analytics.gtm
|
|
138
|
+
? googleTagManagerBootstrapScript()
|
|
139
|
+
: undefined;
|
|
140
|
+
const googleTagManagerNoScript = config.integrations.analytics.gtm
|
|
141
|
+
? googleTagManagerNoScriptUrl(config.integrations.analytics.gtm)
|
|
142
|
+
: undefined;
|
|
143
|
+
const heap = config.integrations.analytics.heap
|
|
144
|
+
? heapBootstrapScript()
|
|
145
|
+
: undefined;
|
|
146
|
+
const hotjar = config.integrations.analytics.hotjar
|
|
147
|
+
? hotjarBootstrapScript()
|
|
148
|
+
: undefined;
|
|
149
|
+
const logRocket = config.integrations.analytics.logrocket
|
|
150
|
+
? logRocketScript()
|
|
151
|
+
: undefined;
|
|
152
|
+
const logRocketBootstrap = logRocket ? logRocketBootstrapScript() : undefined;
|
|
153
|
+
const mixpanel = config.integrations.analytics.mixpanel
|
|
154
|
+
? mixpanelScript()
|
|
155
|
+
: undefined;
|
|
156
|
+
const mixpanelBootstrap = mixpanel ? mixpanelBootstrapScript() : undefined;
|
|
157
|
+
const openpanel = config.integrations.analytics.openpanel
|
|
158
|
+
? openpanelScript()
|
|
159
|
+
: undefined;
|
|
160
|
+
const openpanelBootstrap = openpanel ? openpanelBootstrapScript() : undefined;
|
|
161
|
+
const openReplay = config.integrations.analytics.openreplay
|
|
162
|
+
? openReplayBootstrapScript()
|
|
163
|
+
: undefined;
|
|
164
|
+
const pirsch = config.integrations.analytics.pirsch
|
|
165
|
+
? pirschAnalyticsScript(config.integrations.analytics.pirsch)
|
|
166
|
+
: undefined;
|
|
167
|
+
const plausible = config.integrations.analytics.plausible
|
|
168
|
+
? plausibleAnalyticsScript(config.integrations.analytics.plausible)
|
|
169
|
+
: undefined;
|
|
170
|
+
const posthog = config.integrations.analytics.posthog
|
|
171
|
+
? posthogScript(config.integrations.analytics.posthog)
|
|
172
|
+
: undefined;
|
|
173
|
+
const posthogBootstrap = posthog ? posthogBootstrapScript() : undefined;
|
|
174
|
+
const posthogHost = config.integrations.analytics.posthog
|
|
175
|
+
? posthogApiHost(config.integrations.analytics.posthog)
|
|
176
|
+
: undefined;
|
|
177
|
+
const rybbit = config.integrations.analytics.rybbit
|
|
178
|
+
? rybbitAnalyticsScript(config.integrations.analytics.rybbit)
|
|
179
|
+
: undefined;
|
|
180
|
+
const swetrix = config.integrations.analytics.swetrix
|
|
181
|
+
? swetrixScript()
|
|
182
|
+
: undefined;
|
|
183
|
+
const swetrixBootstrap = swetrix ? swetrixBootstrapScript() : undefined;
|
|
184
|
+
const umami = config.integrations.analytics.umami
|
|
185
|
+
? umamiAnalyticsScript(config.integrations.analytics.umami)
|
|
186
|
+
: undefined;
|
|
187
|
+
const intercom = config.integrations.support.intercom
|
|
188
|
+
? intercomBootstrapScript()
|
|
189
|
+
: undefined;
|
|
190
|
+
const front = config.integrations.support.front ? frontChatScript() : undefined;
|
|
191
|
+
const frontBootstrap = front ? frontChatBootstrapScript() : undefined;
|
|
192
|
+
const chatwoot = config.integrations.support.chatwoot
|
|
193
|
+
? chatwootBootstrapScript()
|
|
194
|
+
: undefined;
|
|
195
|
+
const chaskiq = config.integrations.support.chaskiq
|
|
196
|
+
? chaskiqBootstrapScript()
|
|
197
|
+
: undefined;
|
|
198
|
+
const papercups = config.integrations.support.papercups
|
|
199
|
+
? papercupsBootstrapScript()
|
|
200
|
+
: undefined;
|
|
201
|
+
const typebot = config.integrations.support.typebot
|
|
202
|
+
? typebotBootstrapScript()
|
|
203
|
+
: undefined;
|
|
204
|
+
const zammad = config.integrations.support.zammad
|
|
205
|
+
? zammadChatScript(config.integrations.support.zammad)
|
|
206
|
+
: undefined;
|
|
207
|
+
const zammadBootstrap = zammad ? zammadBootstrapScript() : undefined;
|
|
208
|
+
|
|
45
209
|
export default function RootLayout({ children }: { children: ReactNode }) {
|
|
46
210
|
return (
|
|
47
211
|
<html lang="en" suppressHydrationWarning>
|
|
48
212
|
<head>
|
|
213
|
+
{transcendGoogleConsentDefaults && (
|
|
214
|
+
<script
|
|
215
|
+
dangerouslySetInnerHTML={{
|
|
216
|
+
__html: transcendGoogleConsentDefaults,
|
|
217
|
+
}}
|
|
218
|
+
/>
|
|
219
|
+
)}
|
|
220
|
+
{transcend && (
|
|
221
|
+
<script data-cfasync={transcend.dataCfasync} src={transcend.src} />
|
|
222
|
+
)}
|
|
49
223
|
<meta name="color-scheme" content="light dark" />
|
|
50
224
|
<meta name="referrer" content="strict-origin-when-cross-origin" />
|
|
225
|
+
{osano && <script src={osano.src} />}
|
|
226
|
+
{googleTagManager && (
|
|
227
|
+
<script
|
|
228
|
+
data-google-tag-manager-container-id={
|
|
229
|
+
config.integrations.analytics.gtm?.containerId
|
|
230
|
+
}
|
|
231
|
+
dangerouslySetInnerHTML={{ __html: googleTagManager }}
|
|
232
|
+
/>
|
|
233
|
+
)}
|
|
51
234
|
<script
|
|
52
235
|
dangerouslySetInnerHTML={{
|
|
53
236
|
__html: getThemeScript(THEME_STORAGE_KEY, config.mode),
|
|
54
237
|
}}
|
|
55
238
|
/>
|
|
239
|
+
{adobe && <script async={adobe.async} src={adobe.src} />}
|
|
240
|
+
{amplitude && <script src={amplitude.src} />}
|
|
241
|
+
{clarity && (
|
|
242
|
+
<script
|
|
243
|
+
data-clarity-project-id={
|
|
244
|
+
config.integrations.analytics.clarity?.projectId
|
|
245
|
+
}
|
|
246
|
+
dangerouslySetInnerHTML={{ __html: clarity }}
|
|
247
|
+
/>
|
|
248
|
+
)}
|
|
249
|
+
{clearbit && <script src={clearbit.src} />}
|
|
250
|
+
{fathom && (
|
|
251
|
+
<script
|
|
252
|
+
data-site={fathom.siteId}
|
|
253
|
+
data-spa={fathom.spa}
|
|
254
|
+
defer={fathom.defer}
|
|
255
|
+
src={fathom.src}
|
|
256
|
+
/>
|
|
257
|
+
)}
|
|
258
|
+
{googleAnalytics && googleAnalyticsBootstrap && (
|
|
259
|
+
<>
|
|
260
|
+
<script async={googleAnalytics.async} src={googleAnalytics.src} />
|
|
261
|
+
<script
|
|
262
|
+
data-google-analytics-measurement-id={
|
|
263
|
+
config.integrations.analytics.ga4?.measurementId
|
|
264
|
+
}
|
|
265
|
+
dangerouslySetInnerHTML={{ __html: googleAnalyticsBootstrap }}
|
|
266
|
+
/>
|
|
267
|
+
</>
|
|
268
|
+
)}
|
|
269
|
+
{heap && (
|
|
270
|
+
<script
|
|
271
|
+
data-heap-environment-id={
|
|
272
|
+
config.integrations.analytics.heap?.environmentId
|
|
273
|
+
}
|
|
274
|
+
dangerouslySetInnerHTML={{ __html: heap }}
|
|
275
|
+
/>
|
|
276
|
+
)}
|
|
277
|
+
{hotjar && (
|
|
278
|
+
<script
|
|
279
|
+
data-hotjar-site-id={config.integrations.analytics.hotjar?.siteId}
|
|
280
|
+
data-hotjar-snippet-version={
|
|
281
|
+
config.integrations.analytics.hotjar?.snippetVersion
|
|
282
|
+
}
|
|
283
|
+
dangerouslySetInnerHTML={{ __html: hotjar }}
|
|
284
|
+
/>
|
|
285
|
+
)}
|
|
286
|
+
{logRocket && logRocketBootstrap && (
|
|
287
|
+
<>
|
|
288
|
+
<script crossOrigin={logRocket.crossOrigin} src={logRocket.src} />
|
|
289
|
+
<script
|
|
290
|
+
data-logrocket-app-id={
|
|
291
|
+
config.integrations.analytics.logrocket?.appId
|
|
292
|
+
}
|
|
293
|
+
dangerouslySetInnerHTML={{ __html: logRocketBootstrap }}
|
|
294
|
+
/>
|
|
295
|
+
</>
|
|
296
|
+
)}
|
|
297
|
+
{mixpanel && mixpanelBootstrap && (
|
|
298
|
+
<>
|
|
299
|
+
<script src={mixpanel.src} />
|
|
300
|
+
<script
|
|
301
|
+
data-mixpanel-project-token={
|
|
302
|
+
config.integrations.analytics.mixpanel?.projectToken
|
|
303
|
+
}
|
|
304
|
+
dangerouslySetInnerHTML={{ __html: mixpanelBootstrap }}
|
|
305
|
+
/>
|
|
306
|
+
</>
|
|
307
|
+
)}
|
|
308
|
+
{openpanel && openpanelBootstrap && (
|
|
309
|
+
<>
|
|
310
|
+
<script
|
|
311
|
+
data-openpanel-api-url={
|
|
312
|
+
config.integrations.analytics.openpanel?.apiUrl
|
|
313
|
+
}
|
|
314
|
+
data-openpanel-client-id={
|
|
315
|
+
config.integrations.analytics.openpanel?.clientId
|
|
316
|
+
}
|
|
317
|
+
dangerouslySetInnerHTML={{ __html: openpanelBootstrap }}
|
|
318
|
+
/>
|
|
319
|
+
<script
|
|
320
|
+
async={openpanel.async}
|
|
321
|
+
defer={openpanel.defer}
|
|
322
|
+
src={openpanel.src}
|
|
323
|
+
/>
|
|
324
|
+
</>
|
|
325
|
+
)}
|
|
326
|
+
{openReplay && (
|
|
327
|
+
<script
|
|
328
|
+
data-openreplay-ingest-point={
|
|
329
|
+
config.integrations.analytics.openreplay?.ingestPoint
|
|
330
|
+
}
|
|
331
|
+
data-openreplay-project-key={
|
|
332
|
+
config.integrations.analytics.openreplay?.projectKey
|
|
333
|
+
}
|
|
334
|
+
dangerouslySetInnerHTML={{ __html: openReplay }}
|
|
335
|
+
/>
|
|
336
|
+
)}
|
|
337
|
+
{pirsch && (
|
|
338
|
+
<script
|
|
339
|
+
data-code={pirsch.code}
|
|
340
|
+
defer={pirsch.defer}
|
|
341
|
+
src={pirsch.src}
|
|
342
|
+
/>
|
|
343
|
+
)}
|
|
344
|
+
{plausible && (
|
|
345
|
+
<script
|
|
346
|
+
data-domain={plausible.domain}
|
|
347
|
+
defer={plausible.defer}
|
|
348
|
+
src={plausible.src}
|
|
349
|
+
/>
|
|
350
|
+
)}
|
|
351
|
+
{posthog && posthogBootstrap && posthogHost && (
|
|
352
|
+
<>
|
|
353
|
+
<script src={posthog.src} />
|
|
354
|
+
<script
|
|
355
|
+
data-posthog-api-host={posthogHost}
|
|
356
|
+
data-posthog-project-api-key={
|
|
357
|
+
config.integrations.analytics.posthog?.projectApiKey
|
|
358
|
+
}
|
|
359
|
+
dangerouslySetInnerHTML={{ __html: posthogBootstrap }}
|
|
360
|
+
/>
|
|
361
|
+
</>
|
|
362
|
+
)}
|
|
363
|
+
{rybbit && (
|
|
364
|
+
<script
|
|
365
|
+
data-site-id={rybbit.siteId}
|
|
366
|
+
defer={rybbit.defer}
|
|
367
|
+
src={rybbit.src}
|
|
368
|
+
/>
|
|
369
|
+
)}
|
|
370
|
+
{umami && (
|
|
371
|
+
<script
|
|
372
|
+
data-website-id={umami.websiteId}
|
|
373
|
+
defer={umami.defer}
|
|
374
|
+
src={umami.src}
|
|
375
|
+
/>
|
|
376
|
+
)}
|
|
377
|
+
{chaskiq && (
|
|
378
|
+
<script
|
|
379
|
+
data-chaskiq-app-id={config.integrations.support.chaskiq?.appId}
|
|
380
|
+
data-chaskiq-base-url={config.integrations.support.chaskiq?.baseUrl}
|
|
381
|
+
data-chaskiq-ws-url={config.integrations.support.chaskiq?.wsUrl}
|
|
382
|
+
dangerouslySetInnerHTML={{ __html: chaskiq }}
|
|
383
|
+
/>
|
|
384
|
+
)}
|
|
385
|
+
{papercups && (
|
|
386
|
+
<script
|
|
387
|
+
data-papercups-base-url={
|
|
388
|
+
config.integrations.support.papercups?.baseUrl
|
|
389
|
+
}
|
|
390
|
+
data-papercups-inbox={config.integrations.support.papercups?.inbox}
|
|
391
|
+
data-papercups-token={config.integrations.support.papercups?.token}
|
|
392
|
+
dangerouslySetInnerHTML={{ __html: papercups }}
|
|
393
|
+
/>
|
|
394
|
+
)}
|
|
395
|
+
{typebot && (
|
|
396
|
+
<script
|
|
397
|
+
data-heyo-typebot
|
|
398
|
+
data-typebot-api-host={config.integrations.support.typebot?.apiHost}
|
|
399
|
+
data-typebot-id={config.integrations.support.typebot?.typebot}
|
|
400
|
+
dangerouslySetInnerHTML={{ __html: typebot }}
|
|
401
|
+
type="module"
|
|
402
|
+
/>
|
|
403
|
+
)}
|
|
56
404
|
<script
|
|
57
405
|
type="application/ld+json"
|
|
58
406
|
dangerouslySetInnerHTML={{
|
|
@@ -67,12 +415,75 @@ export default function RootLayout({ children }: { children: ReactNode }) {
|
|
|
67
415
|
/>
|
|
68
416
|
</head>
|
|
69
417
|
<body>
|
|
418
|
+
{googleTagManagerNoScript && (
|
|
419
|
+
<noscript>
|
|
420
|
+
<iframe
|
|
421
|
+
height="0"
|
|
422
|
+
src={googleTagManagerNoScript}
|
|
423
|
+
style={{ display: "none", visibility: "hidden" }}
|
|
424
|
+
title="Google Tag Manager"
|
|
425
|
+
width="0"
|
|
426
|
+
/>
|
|
427
|
+
</noscript>
|
|
428
|
+
)}
|
|
70
429
|
<ThemeProvider
|
|
71
430
|
defaultTheme={config.mode}
|
|
72
431
|
storageKey={THEME_STORAGE_KEY}
|
|
73
432
|
>
|
|
74
433
|
{children}
|
|
75
434
|
</ThemeProvider>
|
|
435
|
+
{swetrix && swetrixBootstrap && (
|
|
436
|
+
<>
|
|
437
|
+
<script defer={swetrix.defer} src={swetrix.src} />
|
|
438
|
+
<script
|
|
439
|
+
data-swetrix-api-url={
|
|
440
|
+
config.integrations.analytics.swetrix?.apiUrl
|
|
441
|
+
}
|
|
442
|
+
data-swetrix-project-id={
|
|
443
|
+
config.integrations.analytics.swetrix?.projectId
|
|
444
|
+
}
|
|
445
|
+
dangerouslySetInnerHTML={{ __html: swetrixBootstrap }}
|
|
446
|
+
/>
|
|
447
|
+
</>
|
|
448
|
+
)}
|
|
449
|
+
{intercom && (
|
|
450
|
+
<script
|
|
451
|
+
data-intercom-app-id={config.integrations.support.intercom?.appId}
|
|
452
|
+
data-intercom-api-base={
|
|
453
|
+
config.integrations.support.intercom?.apiBase
|
|
454
|
+
}
|
|
455
|
+
dangerouslySetInnerHTML={{ __html: intercom }}
|
|
456
|
+
/>
|
|
457
|
+
)}
|
|
458
|
+
{front && frontBootstrap && (
|
|
459
|
+
<>
|
|
460
|
+
<script src={front.src} />
|
|
461
|
+
<script
|
|
462
|
+
data-front-chat-id={config.integrations.support.front?.chatId}
|
|
463
|
+
dangerouslySetInnerHTML={{ __html: frontBootstrap }}
|
|
464
|
+
/>
|
|
465
|
+
</>
|
|
466
|
+
)}
|
|
467
|
+
{chatwoot && (
|
|
468
|
+
<script
|
|
469
|
+
data-chatwoot-base-url={
|
|
470
|
+
config.integrations.support.chatwoot?.baseUrl
|
|
471
|
+
}
|
|
472
|
+
data-chatwoot-website-token={
|
|
473
|
+
config.integrations.support.chatwoot?.websiteToken
|
|
474
|
+
}
|
|
475
|
+
dangerouslySetInnerHTML={{ __html: chatwoot }}
|
|
476
|
+
/>
|
|
477
|
+
)}
|
|
478
|
+
{zammad && zammadBootstrap && (
|
|
479
|
+
<>
|
|
480
|
+
<script src={zammad.src} />
|
|
481
|
+
<script
|
|
482
|
+
data-zammad-chat-id={config.integrations.support.zammad?.chatId}
|
|
483
|
+
dangerouslySetInnerHTML={{ __html: zammadBootstrap }}
|
|
484
|
+
/>
|
|
485
|
+
</>
|
|
486
|
+
)}
|
|
76
487
|
</body>
|
|
77
488
|
</html>
|
|
78
489
|
);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: API overview
|
|
3
|
+
description: Learn how to authenticate and explore the API reference.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# API overview
|
|
7
|
+
|
|
8
|
+
The API reference is generated from `openapi.json`. Use the endpoint pages to
|
|
9
|
+
enter parameters, send a request, and copy a cURL or JavaScript example.
|
|
10
|
+
|
|
11
|
+
## Authentication
|
|
12
|
+
|
|
13
|
+
The example API uses a Bearer token. Enter it once on any protected endpoint;
|
|
14
|
+
Heyo Docs keeps it in this browser while you move between API pages.
|
|
15
|
+
|
|
16
|
+
## Custom pages first
|
|
17
|
+
|
|
18
|
+
This ordinary MDX page belongs to the OpenAPI group. Its section is configured
|
|
19
|
+
before the generated endpoint sections, so it always appears at the top of the
|
|
20
|
+
sidebar.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="960" height="360" viewBox="0 0 960 360" fill="none">
|
|
2
|
+
<rect width="960" height="360" rx="24" fill="#F7F7F8"/>
|
|
3
|
+
<g fill="#FFFFFF" stroke="#D4D4D8" stroke-width="2">
|
|
4
|
+
<rect x="72" y="108" width="220" height="144" rx="18"/>
|
|
5
|
+
<rect x="370" y="108" width="220" height="144" rx="18"/>
|
|
6
|
+
<rect x="668" y="108" width="220" height="144" rx="18"/>
|
|
7
|
+
</g>
|
|
8
|
+
<g fill="#18181B" font-family="Arial, sans-serif" text-anchor="middle">
|
|
9
|
+
<text x="182" y="166" font-size="17" font-weight="700">Content</text>
|
|
10
|
+
<text x="182" y="194" font-size="14" fill="#71717A">MDX and assets</text>
|
|
11
|
+
<text x="480" y="166" font-size="17" font-weight="700">Build</text>
|
|
12
|
+
<text x="480" y="194" font-size="14" fill="#71717A">Vite bundles files</text>
|
|
13
|
+
<text x="778" y="166" font-size="17" font-weight="700">Documentation</text>
|
|
14
|
+
<text x="778" y="194" font-size="14" fill="#71717A">Static output</text>
|
|
15
|
+
</g>
|
|
16
|
+
<g stroke="#71717A" stroke-linecap="round" stroke-width="2">
|
|
17
|
+
<path d="M314 180h34"/>
|
|
18
|
+
<path d="m340 172 8 8-8 8"/>
|
|
19
|
+
<path d="M612 180h34"/>
|
|
20
|
+
<path d="m638 172 8 8-8 8"/>
|
|
21
|
+
</g>
|
|
22
|
+
</svg>
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Changelog
|
|
3
|
+
description: Mock release notes for the Heyo Docs example.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Changelog
|
|
7
|
+
|
|
8
|
+
<Update label="April 2026" tags={["New", "Documentation"]}>
|
|
9
|
+
|
|
10
|
+
## Starter documentation
|
|
11
|
+
|
|
12
|
+
New projects and runnable examples now include a structured Quickstart, basic
|
|
13
|
+
configuration guide, deployment overview, and essential writing patterns.
|
|
14
|
+
|
|
15
|
+
## Square API group
|
|
16
|
+
|
|
17
|
+
The example navigation now keeps the pinned Square OpenAPI schema in its own
|
|
18
|
+
group, making large-schema behaviour easy to inspect.
|
|
19
|
+
|
|
20
|
+
</Update>
|
|
21
|
+
|
|
22
|
+
<Update label="March 2026" tags={["Improved", "Developer experience"]}>
|
|
23
|
+
|
|
24
|
+
## Clearer navigation
|
|
25
|
+
|
|
26
|
+
External documentation links can display an icon, and sidebar groups now keep
|
|
27
|
+
onboarding, API reference, and release notes separate.
|
|
28
|
+
|
|
29
|
+
</Update>
|
|
30
|
+
|
|
31
|
+
<Update label="February 2026" tags={["Fixed"]}>
|
|
32
|
+
|
|
33
|
+
## More predictable previews
|
|
34
|
+
|
|
35
|
+
Preview builds now validate configured routes before mock release notes are
|
|
36
|
+
published.
|
|
37
|
+
|
|
38
|
+
</Update>
|
|
@@ -64,6 +64,40 @@ The order is meaningful: it controls the sidebar and the previous/next links at
|
|
|
64
64
|
the end of each article. Use a page object with `title` and `src` when a
|
|
65
65
|
sidebar entry should point to a page outside the local documentation.
|
|
66
66
|
|
|
67
|
+
## AI chat
|
|
68
|
+
|
|
69
|
+
Add `ai.chat` to enable a documentation-aware chat. `openai`, `claude`, and `grok`
|
|
70
|
+
use the OpenAI, Anthropic, and xAI adapters respectively. Keep the key in a
|
|
71
|
+
server environment variable; Heyo Docs sends it only from the chat endpoint.
|
|
72
|
+
|
|
73
|
+
<CodeBlock language="ts" title="heyo-docs.config.ts">
|
|
74
|
+
{`ai: {
|
|
75
|
+
chat: {
|
|
76
|
+
provider: "openai",
|
|
77
|
+
key: process.env.OPENAI_API_KEY!,
|
|
78
|
+
model: "gpt-5-mini",
|
|
79
|
+
variant: "right", // "center" shows the compact prompt first
|
|
80
|
+
icon: "chat",
|
|
81
|
+
text: "AI Chat",
|
|
82
|
+
name: "Docs Assistant", // name shown in the drawer and message labels
|
|
83
|
+
placeholder: "Ask AI about the docs", // used in the compact prompt and drawer
|
|
84
|
+
},
|
|
85
|
+
},`}
|
|
86
|
+
</CodeBlock>
|
|
87
|
+
|
|
88
|
+
`provider`, `key`, and `model` are required. The model must be an actual model
|
|
89
|
+
identifier, not the provider name. `variant` defaults to `right`. `name`
|
|
90
|
+
defaults to `AI`; it is used for the drawer title and the assistant's message
|
|
91
|
+
label. `placeholder` defaults to
|
|
92
|
+
`Ask AI about the docs` and is shared by the compact prompt and drawer input.
|
|
93
|
+
The drawer stays open while
|
|
94
|
+
readers navigate between documentation pages and does not block the rest of the
|
|
95
|
+
page.
|
|
96
|
+
|
|
97
|
+
Its chrome follows the selected documentation theme. For example, `grain` uses
|
|
98
|
+
a full-height right panel with a left border, while the other themes keep a
|
|
99
|
+
floating panel treatment.
|
|
100
|
+
|
|
67
101
|
## Verify the result
|
|
68
102
|
|
|
69
103
|
Run the project's typecheck and build commands after changing configuration.
|
|
@@ -1,36 +1,34 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Callouts
|
|
3
|
-
description:
|
|
3
|
+
description: Draw attention to a tip, warning, prerequisite, or result.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Callouts
|
|
7
7
|
|
|
8
|
-
Use
|
|
9
|
-
prose. It works well for a prerequisite, a preferred approach, a warning, or a
|
|
10
|
-
successful result.
|
|
8
|
+
Use a callout when a reader should not miss a detail.
|
|
11
9
|
|
|
12
|
-
##
|
|
13
|
-
|
|
14
|
-
Use `note` or `info` for context, `tip` for a recommended approach, and
|
|
15
|
-
`check` for a completed outcome. Reserve `warning` and `danger` for cases
|
|
16
|
-
where missing the message has a real consequence.
|
|
10
|
+
## Add a tip
|
|
17
11
|
|
|
18
12
|
<Callout type="tip" title="Keep examples focused">
|
|
19
13
|
Show one idea at a time so readers can apply it quickly.
|
|
20
14
|
</Callout>
|
|
21
15
|
|
|
16
|
+
## Choose a type
|
|
17
|
+
|
|
18
|
+
| Type | Use it for |
|
|
19
|
+
| --------------------- | ---------------------- |
|
|
20
|
+
| `info` or `note` | Helpful context |
|
|
21
|
+
| `tip` | A recommended approach |
|
|
22
|
+
| `check` | A successful result |
|
|
23
|
+
| `warning` or `danger` | A real consequence |
|
|
24
|
+
|
|
22
25
|
<Callout type="warning" title="Preview before publishing">
|
|
23
|
-
Run the production build
|
|
26
|
+
Run the production build after changing navigation or MDX.
|
|
24
27
|
</Callout>
|
|
25
28
|
|
|
26
|
-
##
|
|
27
|
-
|
|
28
|
-
Pass the message as children when it needs Markdown or another MDX component.
|
|
29
|
+
## Keep it short
|
|
29
30
|
|
|
30
31
|
<Callout type="info" title="Configuration and content work together">
|
|
31
|
-
Navigation belongs in <code>heyo-docs.config.ts</code
|
|
32
|
-
descriptions belong in
|
|
32
|
+
Navigation belongs in <code>heyo-docs.config.ts</code>. Titles and
|
|
33
|
+
descriptions belong in page frontmatter.
|
|
33
34
|
</Callout>
|
|
34
|
-
|
|
35
|
-
Keep each callout focused on one decision. A long sequence of status messages is
|
|
36
|
-
usually clearer as regular sections or a numbered procedure.
|