Skip to content

Commit 8ed907d

Browse files
committed
docs: adopt shared Umbraco docs tooling
1 parent 3606b8c commit 8ed907d

11 files changed

Lines changed: 1150 additions & 720 deletions

File tree

‎.gitignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,4 @@ samples/TheBuilder.WebAnalytics.Example/appsettings-schema.json
2727
.idea/
2828
.vs/
2929
.blume-verify/
30+
apps/docs/public/social/

‎apps/docs/blume.config.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { defineConfig } from "blume";
22

33
import { githubReleaseChangelogSource } from "./sources/github-releases";
4+
import { webAnalyticsPackage } from "./umbraco-package";
45

56
export default defineConfig({
6-
title: "Web Analytics",
7-
description:
8-
"Bring Vercel Web Analytics and Plausible reports into the Umbraco backoffice.",
7+
title: webAnalyticsPackage.name,
8+
description: webAnalyticsPackage.summary,
99
logo: {
1010
image: "/logo.png",
1111
text: "Web Analytics",

‎apps/docs/package.json‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,14 @@
99
"build": "pnpm run generate:og && blume build",
1010
"check": "blume check",
1111
"generate:brand": "node scripts/generate-brand.mjs",
12-
"generate:og": "node scripts/generate-og-image.mjs",
13-
"validate": "blume validate"
12+
"validate": "blume validate",
13+
"generate:og": "umbraco-docs-og",
14+
"check:og": "umbraco-docs-og --check"
1415
},
1516
"devDependencies": {
17+
"@thebuilder/umbraco-docs": "^1.0.0",
1618
"@types/node": "24.10.1",
17-
"blume": "1.2.1",
18-
"gray-matter": "4.0.3",
19+
"blume": "1.4.3",
1920
"sharp": "0.34.5"
2021
}
2122
}

‎apps/docs/pages/_home/home.css‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
.home {
1414
/* Echoes the logo's blue -> purple -> pink for subtle gradient accents. */
1515
--brand-gradient: linear-gradient(105deg, #60a5fa, #a78bfa 52%, #f472b6);
16-
padding-bottom: 5rem;
1716
overflow: clip;
1817
}
1918

@@ -249,6 +248,10 @@
249248
.home-block__head a { color: var(--blume-accent); text-decoration: none; }
250249
.home-block__head a:hover { text-decoration: underline; }
251250

251+
/* Avoid stacking the shared section's bottom margin with this custom page's
252+
footer spacing. The component's card and heading styles remain package-owned. */
253+
.home .udocs-ecosystem { margin-block: clamp(4rem, 9vw, 7rem) 0; }
254+
252255
.trust {
253256
margin-top: clamp(3rem, 7vw, 5rem);
254257
text-align: center;

‎apps/docs/pages/index.astro‎

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,20 @@
55
// and renders correctly; skip type-checking to avoid the false positives.
66
import PageLayout from "blume/components/layout/PageLayout.astro";
77
import data from "blume:data";
8+
import {
9+
EcosystemSection,
10+
LandingRoot,
11+
} from "@thebuilder/umbraco-docs/astro";
812
913
import "./_home/home.css";
1014
1115
import overviewShot from "../docs/screenshots/analytics-overview.png";
1216
import documentShot from "../docs/screenshots/document-analytics-workspace.png";
1317
import settingsShot from "../docs/screenshots/settings.png";
18+
import {
19+
ecosystemPackages,
20+
webAnalyticsPackage,
21+
} from "../umbraco-package";
1422
1523
const { config } = data;
1624
@@ -96,15 +104,15 @@ const steps = [
96104
searchEnabled={config.search.enabled}
97105
siteUrl={config.site}
98106
ogEnabled={config.og.enabled}
99-
ogImage="/opengraph-image.png"
107+
ogImage="/social/index.png"
100108
page={{
101109
title: "Web Analytics for Umbraco",
102110
description:
103111
"Bring Vercel Web Analytics and Plausible reports into the Umbraco backoffice: site-wide and page-level traffic where editors already work.",
104112
route: "/",
105113
}}
106114
>
107-
<div class="home" data-home>
115+
<LandingRoot class="home">
108116
{/* Hero */}
109117
<section class="hero">
110118
<div class="hero__glow" aria-hidden="true"></div>
@@ -317,7 +325,12 @@ const steps = [
317325
</div>
318326
</div>
319327
</section>
320-
</div>
328+
329+
<EcosystemSection
330+
packages={ecosystemPackages}
331+
currentPackageId={webAnalyticsPackage.id}
332+
/>
333+
</LandingRoot>
321334

322335
{/* Footer */}
323336
<footer class="home-footer" slot="footer">
@@ -340,7 +353,7 @@ const steps = [
340353
</PageLayout>
341354

342355
<script>
343-
const root = document.querySelector<HTMLElement>("[data-home]");
356+
const root = document.querySelector<HTMLElement>("[data-udocs-root]");
344357
const prefersReduced = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
345358

346359
if (root && !prefersReduced && "IntersectionObserver" in window) {
Lines changed: 20 additions & 0 deletions
Loading

‎apps/docs/scripts/generate-og-image.mjs‎

Lines changed: 0 additions & 131 deletions
This file was deleted.

‎apps/docs/umbraco-docs.config.mjs‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { defineOgConfig } from "@thebuilder/umbraco-docs/og";
2+
import { fileURLToPath } from "node:url";
3+
4+
export default defineOgConfig({
5+
contentDir: fileURLToPath(new URL("./docs", import.meta.url)),
6+
publicDir: fileURLToPath(new URL("./public", import.meta.url)),
7+
prefix: "/social",
8+
brand: "TheBuilder · Web Analytics",
9+
accent: "#3544b1",
10+
root: {
11+
title: "Web Analytics",
12+
description: "Bring Vercel Web Analytics and Plausible reports into the Umbraco backoffice.",
13+
},
14+
});

‎apps/docs/umbraco-package.ts‎

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
import { defineUmbracoPackage } from "@thebuilder/umbraco-docs";
2+
3+
export const webAnalyticsPackage = defineUmbracoPackage({
4+
id: "thebuilder.webanalytics",
5+
name: "Web Analytics",
6+
summary: "Connect analytics providers and bring site-wide and page-level insights into the Umbraco backoffice.",
7+
links: {
8+
docs: "https://umbraco-web-analytics.vercel.app/",
9+
nuget: "https://www.nuget.org/packages/TheBuilder.WebAnalytics",
10+
marketplace: "https://marketplace.umbraco.com/package/thebuilder.webanalytics",
11+
github: "https://github.com/thebuilder/web-analytics",
12+
},
13+
logo: "/logo.png",
14+
compatibility: { umbraco: ">=17.1 <19", dotnet: ">=10" },
15+
status: "stable",
16+
categories: ["Analytics", "Editor Tools"],
17+
});
18+
19+
export const blurPlaceholderPackage = defineUmbracoPackage({
20+
id: "thebuilder.blurplaceholder",
21+
name: "Blur Placeholder",
22+
summary: "Generate WebP, BlurHash, or ThumbHash placeholders for Umbraco Image media and deliver one frontend-ready string.",
23+
links: {
24+
docs: "https://blur-placeholder.vercel.app/",
25+
nuget: "https://www.nuget.org/packages/TheBuilder.BlurPlaceholder",
26+
marketplace: "https://marketplace.umbraco.com/package/thebuilder.blurplaceholder",
27+
github: "https://github.com/thebuilder/blur-placeholder",
28+
},
29+
logo: "/ecosystem/blur-placeholder.svg",
30+
compatibility: { umbraco: ">=17.1 <19", dotnet: ">=10" },
31+
status: "stable",
32+
categories: ["Developer Tools", "Media"],
33+
});
34+
35+
export const ecosystemPackages = [webAnalyticsPackage, blurPlaceholderPackage];

0 commit comments

Comments
 (0)