@heyo-sh/create-heyo-docs 0.2.3 → 0.3.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.
@@ -4,7 +4,7 @@
4
4
  "cf-typegen": "wrangler types --config dist/server/wrangler.json"
5
5
  },
6
6
  "dependencies": {
7
- "@astrojs/cloudflare": "^14.2.3"
7
+ "@astrojs/cloudflare": "14.2.6"
8
8
  },
9
9
  "devDependencies": {
10
10
  "wrangler": "^4.125.0"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@heyo-sh/create-heyo-docs",
3
- "version": "0.2.3",
3
+ "version": "0.3.0",
4
4
  "description": "Create a standalone Heyo Docs documentation project.",
5
5
  "homepage": "https://heyo.sh",
6
6
  "repository": {
@@ -15,7 +15,7 @@
15
15
  "@astrojs/react": "^6.0.4",
16
16
  "@fontsource-variable/figtree": "^5.3.0",
17
17
  "@remixicon/react": "^4.9.0",
18
- "astro": "^7.2.4",
18
+ "astro": "7.2.10",
19
19
  "@heyo-sh/heyo-docs": "{{HEYO_DOCS_VERSION}}",
20
20
  "react": "19.2.8",
21
21
  "react-dom": "19.2.8",
@@ -1,5 +1,64 @@
1
1
  ---
2
2
  import config from "../../heyo-docs.config";
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
  import "../styles/app.css";
4
63
  import { getThemeScript, THEME_STORAGE_KEY } from "../lib/theme";
5
64
 
@@ -20,11 +79,128 @@ const {
20
79
  } = Astro.props;
21
80
  const jsonLd = JSON.stringify(structuredData).replace(/</g, "\\u003c");
22
81
  const hasChangelog = config.groups.some((group) => group.type === "changelog");
82
+ const osano = config.integrations.consent.osano
83
+ ? osanoConsentScript(config.integrations.consent.osano)
84
+ : undefined;
85
+ const transcend = config.integrations.consent.transcend
86
+ ? transcendConsentScript(config.integrations.consent.transcend)
87
+ : undefined;
88
+ const transcendGoogleConsentDefaults =
89
+ transcend &&
90
+ (config.integrations.analytics.ga4 || config.integrations.analytics.gtm)
91
+ ? transcendGoogleConsentModeDefaultsScript()
92
+ : undefined;
93
+ const adobe = config.integrations.analytics.adobe
94
+ ? adobeAnalyticsScript(config.integrations.analytics.adobe)
95
+ : undefined;
96
+ const amplitude = config.integrations.analytics.amplitude
97
+ ? amplitudeAnalyticsScript(config.integrations.analytics.amplitude)
98
+ : undefined;
99
+ const clarity = config.integrations.analytics.clarity
100
+ ? clarityBootstrapScript()
101
+ : undefined;
102
+ const clearbit = config.integrations.analytics.clearbit
103
+ ? clearbitAnalyticsScript(config.integrations.analytics.clearbit)
104
+ : undefined;
105
+ const fathom = config.integrations.analytics.fathom
106
+ ? fathomAnalyticsScript(config.integrations.analytics.fathom)
107
+ : undefined;
108
+ const googleAnalytics = config.integrations.analytics.ga4
109
+ ? googleAnalyticsScript(config.integrations.analytics.ga4)
110
+ : undefined;
111
+ const googleAnalyticsBootstrap = googleAnalytics
112
+ ? googleAnalyticsBootstrapScript()
113
+ : undefined;
114
+ const googleTagManager = config.integrations.analytics.gtm
115
+ ? googleTagManagerBootstrapScript()
116
+ : undefined;
117
+ const googleTagManagerNoScript = config.integrations.analytics.gtm
118
+ ? googleTagManagerNoScriptUrl(config.integrations.analytics.gtm)
119
+ : undefined;
120
+ const heap = config.integrations.analytics.heap
121
+ ? heapBootstrapScript()
122
+ : undefined;
123
+ const hotjar = config.integrations.analytics.hotjar
124
+ ? hotjarBootstrapScript()
125
+ : undefined;
126
+ const logRocket = config.integrations.analytics.logrocket
127
+ ? logRocketScript()
128
+ : undefined;
129
+ const logRocketBootstrap = logRocket ? logRocketBootstrapScript() : undefined;
130
+ const mixpanel = config.integrations.analytics.mixpanel
131
+ ? mixpanelScript()
132
+ : undefined;
133
+ const mixpanelBootstrap = mixpanel ? mixpanelBootstrapScript() : undefined;
134
+ const openpanel = config.integrations.analytics.openpanel
135
+ ? openpanelScript()
136
+ : undefined;
137
+ const openpanelBootstrap = openpanel ? openpanelBootstrapScript() : undefined;
138
+ const openReplay = config.integrations.analytics.openreplay
139
+ ? openReplayBootstrapScript()
140
+ : undefined;
141
+ const pirsch = config.integrations.analytics.pirsch
142
+ ? pirschAnalyticsScript(config.integrations.analytics.pirsch)
143
+ : undefined;
144
+ const plausible = config.integrations.analytics.plausible
145
+ ? plausibleAnalyticsScript(config.integrations.analytics.plausible)
146
+ : undefined;
147
+ const posthog = config.integrations.analytics.posthog
148
+ ? posthogScript(config.integrations.analytics.posthog)
149
+ : undefined;
150
+ const posthogBootstrap = posthog ? posthogBootstrapScript() : undefined;
151
+ const posthogHost = config.integrations.analytics.posthog
152
+ ? posthogApiHost(config.integrations.analytics.posthog)
153
+ : undefined;
154
+ const rybbit = config.integrations.analytics.rybbit
155
+ ? rybbitAnalyticsScript(config.integrations.analytics.rybbit)
156
+ : undefined;
157
+ const swetrix = config.integrations.analytics.swetrix
158
+ ? swetrixScript()
159
+ : undefined;
160
+ const swetrixBootstrap = swetrix ? swetrixBootstrapScript() : undefined;
161
+ const umami = config.integrations.analytics.umami
162
+ ? umamiAnalyticsScript(config.integrations.analytics.umami)
163
+ : undefined;
164
+ const intercom = config.integrations.support.intercom
165
+ ? intercomBootstrapScript()
166
+ : undefined;
167
+ const front = config.integrations.support.front ? frontChatScript() : undefined;
168
+ const frontBootstrap = front ? frontChatBootstrapScript() : undefined;
169
+ const chatwoot = config.integrations.support.chatwoot
170
+ ? chatwootBootstrapScript()
171
+ : undefined;
172
+ const chaskiq = config.integrations.support.chaskiq
173
+ ? chaskiqBootstrapScript()
174
+ : undefined;
175
+ const papercups = config.integrations.support.papercups
176
+ ? papercupsBootstrapScript()
177
+ : undefined;
178
+ const typebot = config.integrations.support.typebot
179
+ ? typebotBootstrapScript()
180
+ : undefined;
181
+ const zammad = config.integrations.support.zammad
182
+ ? zammadChatScript(config.integrations.support.zammad)
183
+ : undefined;
184
+ const zammadBootstrap = zammad ? zammadBootstrapScript() : undefined;
23
185
  ---
24
186
 
25
187
  <!doctype html>
26
188
  <html lang="en">
27
189
  <head>
190
+ {
191
+ transcendGoogleConsentDefaults && (
192
+ <script is:inline set:html={transcendGoogleConsentDefaults} />
193
+ )
194
+ }
195
+ {
196
+ transcend && (
197
+ <script
198
+ is:inline
199
+ data-cfasync={transcend.dataCfasync}
200
+ src={transcend.src}
201
+ />
202
+ )
203
+ }
28
204
  <meta charset="utf-8" />
29
205
  <meta name="viewport" content="width=device-width, initial-scale=1" />
30
206
  <meta name="color-scheme" content="light dark" />
@@ -43,12 +219,7 @@ const hasChangelog = config.groups.some((group) => group.type === "changelog");
43
219
  {canonical && <meta property="og:url" content={canonical} />}
44
220
  <link rel="icon" href="/favicon.ico" sizes="any" />
45
221
  <link rel="icon" href="/favicon.svg" type="image/svg+xml" />
46
- <link
47
- rel="icon"
48
- href="/favicon-96x96.png"
49
- sizes="96x96"
50
- type="image/png"
51
- />
222
+ <link rel="icon" href="/favicon-96x96.png" sizes="96x96" type="image/png" />
52
223
  <link rel="apple-touch-icon" href="/apple-touch-icon.png" sizes="180x180" />
53
224
  <link rel="manifest" href="/site.webmanifest" />
54
225
  {
@@ -61,10 +232,324 @@ const hasChangelog = config.groups.some((group) => group.type === "changelog");
61
232
  />
62
233
  )
63
234
  }
64
- <script is:inline set:html={getThemeScript(THEME_STORAGE_KEY, config.mode)}></script>
65
- <script is:inline type="application/ld+json" set:html={jsonLd}></script>
235
+ {osano && <script is:inline src={osano.src} />}
236
+ {
237
+ googleTagManager && (
238
+ <script
239
+ is:inline
240
+ data-google-tag-manager-container-id={
241
+ config.integrations.analytics.gtm?.containerId
242
+ }
243
+ set:html={googleTagManager}
244
+ />
245
+ )
246
+ }
247
+ <script
248
+ is:inline
249
+ set:html={getThemeScript(THEME_STORAGE_KEY, config.mode)}
250
+ />
251
+ {adobe && <script is:inline async src={adobe.src} />}
252
+ {amplitude && <script is:inline src={amplitude.src} />}
253
+ {
254
+ clarity && (
255
+ <script
256
+ is:inline
257
+ data-clarity-project-id={
258
+ config.integrations.analytics.clarity?.projectId
259
+ }
260
+ set:html={clarity}
261
+ />
262
+ )
263
+ }
264
+ {clearbit && <script is:inline src={clearbit.src} />}
265
+ {
266
+ fathom && (
267
+ <script
268
+ is:inline
269
+ data-site={fathom.siteId}
270
+ data-spa={fathom.spa}
271
+ defer={fathom.defer}
272
+ src={fathom.src}
273
+ />
274
+ )
275
+ }
276
+ {
277
+ googleAnalytics && googleAnalyticsBootstrap && (
278
+ <>
279
+ <script
280
+ is:inline
281
+ async={googleAnalytics.async}
282
+ src={googleAnalytics.src}
283
+ />
284
+ <script
285
+ is:inline
286
+ data-google-analytics-measurement-id={
287
+ config.integrations.analytics.ga4?.measurementId
288
+ }
289
+ set:html={googleAnalyticsBootstrap}
290
+ />
291
+ </>
292
+ )
293
+ }
294
+ {
295
+ heap && (
296
+ <script
297
+ is:inline
298
+ data-heap-environment-id={
299
+ config.integrations.analytics.heap?.environmentId
300
+ }
301
+ set:html={heap}
302
+ />
303
+ )
304
+ }
305
+ {
306
+ hotjar && (
307
+ <script
308
+ is:inline
309
+ data-hotjar-site-id={config.integrations.analytics.hotjar?.siteId}
310
+ data-hotjar-snippet-version={
311
+ config.integrations.analytics.hotjar?.snippetVersion
312
+ }
313
+ set:html={hotjar}
314
+ />
315
+ )
316
+ }
317
+ {
318
+ logRocket && logRocketBootstrap && (
319
+ <>
320
+ <script
321
+ is:inline
322
+ crossorigin={logRocket.crossOrigin}
323
+ src={logRocket.src}
324
+ />
325
+ <script
326
+ is:inline
327
+ data-logrocket-app-id={
328
+ config.integrations.analytics.logrocket?.appId
329
+ }
330
+ set:html={logRocketBootstrap}
331
+ />
332
+ </>
333
+ )
334
+ }
335
+ {
336
+ mixpanel && mixpanelBootstrap && (
337
+ <>
338
+ <script is:inline src={mixpanel.src} />
339
+ <script
340
+ is:inline
341
+ data-mixpanel-project-token={
342
+ config.integrations.analytics.mixpanel?.projectToken
343
+ }
344
+ set:html={mixpanelBootstrap}
345
+ />
346
+ </>
347
+ )
348
+ }
349
+ {
350
+ openpanel && openpanelBootstrap && (
351
+ <>
352
+ <script
353
+ is:inline
354
+ data-openpanel-api-url={
355
+ config.integrations.analytics.openpanel?.apiUrl
356
+ }
357
+ data-openpanel-client-id={
358
+ config.integrations.analytics.openpanel?.clientId
359
+ }
360
+ set:html={openpanelBootstrap}
361
+ />
362
+ <script
363
+ is:inline
364
+ async={openpanel.async}
365
+ defer={openpanel.defer}
366
+ src={openpanel.src}
367
+ />
368
+ </>
369
+ )
370
+ }
371
+ {
372
+ openReplay && (
373
+ <script
374
+ is:inline
375
+ data-openreplay-ingest-point={
376
+ config.integrations.analytics.openreplay?.ingestPoint
377
+ }
378
+ data-openreplay-project-key={
379
+ config.integrations.analytics.openreplay?.projectKey
380
+ }
381
+ set:html={openReplay}
382
+ />
383
+ )
384
+ }
385
+ {
386
+ pirsch && (
387
+ <script
388
+ is:inline
389
+ data-code={pirsch.code}
390
+ defer={pirsch.defer}
391
+ src={pirsch.src}
392
+ />
393
+ )
394
+ }
395
+ {
396
+ plausible && (
397
+ <script
398
+ is:inline
399
+ data-domain={plausible.domain}
400
+ defer={plausible.defer}
401
+ src={plausible.src}
402
+ />
403
+ )
404
+ }
405
+ {
406
+ posthog && posthogBootstrap && posthogHost && (
407
+ <>
408
+ <script is:inline src={posthog.src} />
409
+ <script
410
+ is:inline
411
+ data-posthog-api-host={posthogHost}
412
+ data-posthog-project-api-key={
413
+ config.integrations.analytics.posthog?.projectApiKey
414
+ }
415
+ set:html={posthogBootstrap}
416
+ />
417
+ </>
418
+ )
419
+ }
420
+ {
421
+ rybbit && (
422
+ <script
423
+ is:inline
424
+ data-site-id={rybbit.siteId}
425
+ defer={rybbit.defer}
426
+ src={rybbit.src}
427
+ />
428
+ )
429
+ }
430
+ {
431
+ umami && (
432
+ <script
433
+ is:inline
434
+ data-website-id={umami.websiteId}
435
+ defer={umami.defer}
436
+ src={umami.src}
437
+ />
438
+ )
439
+ }
440
+ {
441
+ chaskiq && (
442
+ <script
443
+ is:inline
444
+ data-chaskiq-app-id={config.integrations.support.chaskiq?.appId}
445
+ data-chaskiq-base-url={config.integrations.support.chaskiq?.baseUrl}
446
+ data-chaskiq-ws-url={config.integrations.support.chaskiq?.wsUrl}
447
+ set:html={chaskiq}
448
+ />
449
+ )
450
+ }
451
+ {
452
+ papercups && (
453
+ <script
454
+ is:inline
455
+ data-papercups-base-url={
456
+ config.integrations.support.papercups?.baseUrl
457
+ }
458
+ data-papercups-inbox={config.integrations.support.papercups?.inbox}
459
+ data-papercups-token={config.integrations.support.papercups?.token}
460
+ set:html={papercups}
461
+ />
462
+ )
463
+ }
464
+ {
465
+ typebot && (
466
+ <script
467
+ is:inline
468
+ data-heyo-typebot
469
+ data-typebot-api-host={config.integrations.support.typebot?.apiHost}
470
+ data-typebot-id={config.integrations.support.typebot?.typebot}
471
+ set:html={typebot}
472
+ type="module"
473
+ />
474
+ )
475
+ }
476
+ <script is:inline type="application/ld+json" set:html={jsonLd} />
66
477
  </head>
67
478
  <body>
479
+ {
480
+ googleTagManagerNoScript && (
481
+ <noscript>
482
+ <iframe
483
+ height="0"
484
+ src={googleTagManagerNoScript}
485
+ style="display:none;visibility:hidden"
486
+ title="Google Tag Manager"
487
+ width="0"
488
+ />
489
+ </noscript>
490
+ )
491
+ }
68
492
  <slot />
493
+ {
494
+ swetrix && swetrixBootstrap && (
495
+ <>
496
+ <script is:inline defer={swetrix.defer} src={swetrix.src} />
497
+ <script
498
+ is:inline
499
+ data-swetrix-api-url={config.integrations.analytics.swetrix?.apiUrl}
500
+ data-swetrix-project-id={
501
+ config.integrations.analytics.swetrix?.projectId
502
+ }
503
+ set:html={swetrixBootstrap}
504
+ />
505
+ </>
506
+ )
507
+ }
508
+ {
509
+ intercom && (
510
+ <script
511
+ is:inline
512
+ data-intercom-app-id={config.integrations.support.intercom?.appId}
513
+ data-intercom-api-base={config.integrations.support.intercom?.apiBase}
514
+ set:html={intercom}
515
+ />
516
+ )
517
+ }
518
+ {
519
+ front && frontBootstrap && (
520
+ <>
521
+ <script is:inline src={front.src} />
522
+ <script
523
+ is:inline
524
+ data-front-chat-id={config.integrations.support.front?.chatId}
525
+ set:html={frontBootstrap}
526
+ />
527
+ </>
528
+ )
529
+ }
530
+ {
531
+ chatwoot && (
532
+ <script
533
+ is:inline
534
+ data-chatwoot-base-url={config.integrations.support.chatwoot?.baseUrl}
535
+ data-chatwoot-website-token={
536
+ config.integrations.support.chatwoot?.websiteToken
537
+ }
538
+ set:html={chatwoot}
539
+ />
540
+ )
541
+ }
542
+ {
543
+ zammad && zammadBootstrap && (
544
+ <>
545
+ <script is:inline src={zammad.src} />
546
+ <script
547
+ is:inline
548
+ data-zammad-chat-id={config.integrations.support.zammad?.chatId}
549
+ set:html={zammadBootstrap}
550
+ />
551
+ </>
552
+ )
553
+ }
69
554
  </body>
70
555
  </html>
@@ -38,10 +38,7 @@ const seo = exists
38
38
  };
39
39
  ---
40
40
 
41
- <DocsLayout
42
- {...seo}
43
- robots={exists ? "index, follow" : "noindex"}
44
- >
41
+ <DocsLayout {...seo} robots={exists ? "index, follow" : "noindex"}>
45
42
  <AstroDocsApp
46
43
  client:load
47
44
  currentOpenApiEndpoint={currentOpenApiEndpoint}