@thebuilder/umbraco-docs 1.9.0 → 1.10.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/README.md +16 -0
- package/dist/analytics.d.ts +14 -0
- package/dist/analytics.js +20 -0
- package/dist/analytics.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/pageflock.d.ts +5 -0
- package/dist/pageflock.js +6 -0
- package/dist/pageflock.js.map +1 -0
- package/package.json +5 -1
package/README.md
CHANGED
|
@@ -67,6 +67,22 @@ export default defineConfig({
|
|
|
67
67
|
|
|
68
68
|
The accent has a shade per color mode, `#7557e8` in light and `#a78bfa` in dark, and each meets WCAG AA as link text and with its button label, which Blume picks: white in light, dark in dark. It needs Blume 2. `DOCS_ACCENT` exports the two shades for other uses, such as the hub's own CSS.
|
|
69
69
|
|
|
70
|
+
## Analytics
|
|
71
|
+
|
|
72
|
+
Every docs site counts visits with [Pageflock](https://pageflock.com), in the thebuilder workspace, where each site has a Pageflock site of its own. Its ID is the site's domain with dots as dashes, such as `blur-thebuilder-dk`. Add `pageflock()` to `analytics` in `blume.config.ts`, next to any other adapters:
|
|
73
|
+
|
|
74
|
+
```ts
|
|
75
|
+
import { pageflock } from "@thebuilder/umbraco-docs/analytics";
|
|
76
|
+
import { defineConfig } from "blume";
|
|
77
|
+
import { vercel } from "blume/analytics";
|
|
78
|
+
|
|
79
|
+
export default defineConfig({
|
|
80
|
+
analytics: [vercel(), pageflock("blur-thebuilder-dk")],
|
|
81
|
+
});
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
It loads Pageflock's script with automatic events on, so outbound links, file downloads and 404s count too. It needs Blume 2. `PAGEFLOCK_SCRIPT_SRC` exports the script's URL for a site that isn't built with Blume, such as the hub.
|
|
85
|
+
|
|
70
86
|
## Diagrams
|
|
71
87
|
|
|
72
88
|
Blume turns a ` ```mermaid ` fence in an `.mdx` page into a [Mermaid](https://mermaid.js.org) diagram, and only loads Mermaid on pages that have one. Out of the box it uses Mermaid's own lavender and yellow. `styles/diagrams.css` repaints diagrams from the site's Blume tokens instead, so boxes take the family accent, notes and frames use the muted surface, and the text uses the body font, in both color modes. Import it at the top of the site's `theme.css`:
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { PAGEFLOCK_SCRIPT_SRC } from "./pageflock.js";
|
|
2
|
+
export { PAGEFLOCK_SCRIPT_SRC };
|
|
3
|
+
/**
|
|
4
|
+
* Pageflock analytics for a package docs site, as a Blume analytics adapter. Each docs site has its
|
|
5
|
+
* own Pageflock site in the thebuilder workspace; pass its ID (the domain with dots as dashes,
|
|
6
|
+
* such as `blur-thebuilder-dk`). Add it to `analytics` in `blume.config.ts`:
|
|
7
|
+
*
|
|
8
|
+
* ```ts
|
|
9
|
+
* import { pageflock } from "@thebuilder/umbraco-docs/analytics";
|
|
10
|
+
*
|
|
11
|
+
* export default defineConfig({ analytics: [vercel(), pageflock("blur-thebuilder-dk")] });
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
14
|
+
export declare const pageflock: (site: string) => import("blume/analytics").ScriptAdapter;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { script } from "blume/analytics";
|
|
2
|
+
import { PAGEFLOCK_SCRIPT_SRC } from "./pageflock.js";
|
|
3
|
+
export { PAGEFLOCK_SCRIPT_SRC };
|
|
4
|
+
/**
|
|
5
|
+
* Pageflock analytics for a package docs site, as a Blume analytics adapter. Each docs site has its
|
|
6
|
+
* own Pageflock site in the thebuilder workspace; pass its ID (the domain with dots as dashes,
|
|
7
|
+
* such as `blur-thebuilder-dk`). Add it to `analytics` in `blume.config.ts`:
|
|
8
|
+
*
|
|
9
|
+
* ```ts
|
|
10
|
+
* import { pageflock } from "@thebuilder/umbraco-docs/analytics";
|
|
11
|
+
*
|
|
12
|
+
* export default defineConfig({ analytics: [vercel(), pageflock("blur-thebuilder-dk")] });
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
export const pageflock = (site) => script({
|
|
16
|
+
src: PAGEFLOCK_SCRIPT_SRC,
|
|
17
|
+
strategy: "defer",
|
|
18
|
+
attributes: { "data-site": site },
|
|
19
|
+
});
|
|
20
|
+
//# sourceMappingURL=analytics.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"analytics.js","sourceRoot":"","sources":["../src/analytics.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEzC,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAEtD,OAAO,EAAE,oBAAoB,EAAE,CAAC;AAEhC;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,IAAY,EAAE,EAAE,CACxC,MAAM,CAAC;IACL,GAAG,EAAE,oBAAoB;IACzB,QAAQ,EAAE,OAAO;IACjB,UAAU,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE;CAClC,CAAC,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -4,3 +4,4 @@ export { formatUmbracoVersions } from "./compatibility.js";
|
|
|
4
4
|
export { DEFAULT_REGISTRY_URL, loadUmbracoPackages } from "./registry.js";
|
|
5
5
|
export type { LoadUmbracoPackagesOptions } from "./registry.js";
|
|
6
6
|
export { DOCS_ACCENT, docsTheme } from "./theme.js";
|
|
7
|
+
export { PAGEFLOCK_SCRIPT_SRC } from "./pageflock.js";
|
package/dist/index.js
CHANGED
|
@@ -2,4 +2,5 @@ export { UMBRACO_PACKAGE_STATUSES, defineUmbracoPackage, validateUmbracoPackage,
|
|
|
2
2
|
export { formatUmbracoVersions } from "./compatibility.js";
|
|
3
3
|
export { DEFAULT_REGISTRY_URL, loadUmbracoPackages } from "./registry.js";
|
|
4
4
|
export { DOCS_ACCENT, docsTheme } from "./theme.js";
|
|
5
|
+
export { PAGEFLOCK_SCRIPT_SRC } from "./pageflock.js";
|
|
5
6
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,oBAAoB,EACpB,sBAAsB,GACvB,MAAM,cAAc,CAAC;AAOtB,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAE1E,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,oBAAoB,EACpB,sBAAsB,GACvB,MAAM,cAAc,CAAC;AAOtB,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAE1E,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pageflock's tracking script, with automatic events on: outbound links, file downloads and 404s
|
|
3
|
+
* count on top of page views. Every docs site and the hub load it with their own `data-site`.
|
|
4
|
+
*/
|
|
5
|
+
export declare const PAGEFLOCK_SCRIPT_SRC = "https://e.pageflock.com/s.auto.js";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pageflock's tracking script, with automatic events on: outbound links, file downloads and 404s
|
|
3
|
+
* count on top of page views. Every docs site and the hub load it with their own `data-site`.
|
|
4
|
+
*/
|
|
5
|
+
export const PAGEFLOCK_SCRIPT_SRC = "https://e.pageflock.com/s.auto.js";
|
|
6
|
+
//# sourceMappingURL=pageflock.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pageflock.js","sourceRoot":"","sources":["../src/pageflock.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,mCAAmC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thebuilder/umbraco-docs",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.10.0",
|
|
4
4
|
"description": "Composable Blume presentation and metadata contracts for TheBuilder Umbraco package documentation.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -33,6 +33,10 @@
|
|
|
33
33
|
"./styles/landing.css": "./styles/landing.css",
|
|
34
34
|
"./styles/diagrams.css": "./styles/diagrams.css",
|
|
35
35
|
"./behaviors": "./dist/behaviors.js",
|
|
36
|
+
"./analytics": {
|
|
37
|
+
"types": "./dist/analytics.d.ts",
|
|
38
|
+
"import": "./dist/analytics.js"
|
|
39
|
+
},
|
|
36
40
|
"./og": {
|
|
37
41
|
"types": "./dist/og/index.d.ts",
|
|
38
42
|
"import": "./dist/og/index.js"
|