@lupinum/ginko-docs 0.3.0-rc.2 → 0.3.0-rc.3

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/README.md CHANGED
@@ -15,7 +15,7 @@ Ginko Docs is a Nuxt layer for focused documentation sites. It combines Ginko Co
15
15
  Install the layer and its Ginko Content peer:
16
16
 
17
17
  ```bash
18
- pnpm add -D @lupinum/ginko-docs@0.3.0-rc.2 @lupinum/ginko-content@0.4.0-rc.1
18
+ pnpm add -D @lupinum/ginko-docs@0.3.0-rc.3 @lupinum/ginko-content@0.4.0-rc.1
19
19
  ```
20
20
 
21
21
  Keep the public identity in one shared value:
@@ -1,6 +1,9 @@
1
1
  import { useScriptPlausibleAnalytics } from "#imports";
2
2
  import { useGinkoDocsConfig } from "./useGinkoDocsConfig";
3
3
 
4
+ const PLAUSIBLE_INITIALIZER =
5
+ "window.plausible=window.plausible||function(){(plausible.q=plausible.q||[]).push(arguments)},plausible.init=plausible.init||function(i){plausible.o=i||{}};plausible.init()";
6
+
4
7
  export type AnalyticsProps = Record<string, string>;
5
8
 
6
9
  export interface GinkoAnalytics {
@@ -21,11 +24,19 @@ export function useGinkoAnalytics(): GinkoAnalytics {
21
24
  return { enabled: false, track: () => {} };
22
25
  }
23
26
 
27
+ const src = `https://plausible.io/js/pa-${scriptId}.js`;
28
+ useHead({
29
+ script: [
30
+ { key: "plausibleAnalytics", src, async: true },
31
+ { key: "plausibleAnalyticsInit", innerHTML: PLAUSIBLE_INITIALIZER },
32
+ ],
33
+ });
34
+
24
35
  const script = useScriptPlausibleAnalytics({
25
36
  scriptId,
26
- // The site ID comes from app.config at runtime. Keep the vendor script
27
- // external so Nuxt Scripts does not bundle its legacy fallback URL during
28
- // the build-time transform.
37
+ // Plausible verifies its exact snippet in server-rendered HTML. The head
38
+ // entry above provides it; Nuxt Scripts reuses the same keyed script for
39
+ // its typed proxy and lifecycle instead of adding a second tracker.
29
40
  scriptOptions: { bundle: false },
30
41
  });
31
42
 
package/nuxt.config.ts CHANGED
@@ -43,7 +43,7 @@ export default defineNuxtConfig({
43
43
  },
44
44
  mcp: {
45
45
  name: "Ginko Docs",
46
- version: "0.3.0-rc.2",
46
+ version: "0.3.0-rc.3",
47
47
  },
48
48
  components: {
49
49
  dirs: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lupinum/ginko-docs",
3
- "version": "0.3.0-rc.2",
3
+ "version": "0.3.0-rc.3",
4
4
  "description": "A Nuxt documentation layer powered by Ginko Content.",
5
5
  "keywords": [
6
6
  "content",