Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import starlightPageActions from "starlight-page-actions";
import { codeHeader } from "./src/code-header.ts";
import { basalt, bone } from "./src/code-themes.ts";
import { SIDEBAR } from "./src/sidebar.ts";
import { DESCRIPTION, PROMPT, SITE, socialImage } from "./src/site.ts";
import { analytics, DESCRIPTION, PROMPT, SITE, socialImage } from "./src/site.ts";

// The fonts of bounda.dev, self-hosted at build time with metric-matched fallbacks. Science Gothic
// is only ever set at 600, so it is requested at that one weight across the width axis it uses.
Expand Down Expand Up @@ -55,7 +55,7 @@ export default defineConfig({
},
description: DESCRIPTION,
customCss: ["./src/styles/bounda.css"],
head: socialImage(`${SITE}/og.jpg`),
head: [...socialImage(`${SITE}/og.jpg`), analytics],
routeMiddleware: "./src/route-data.ts",
// src/pages/404.astro keeps the sidebar and offers the search.
disable404Route: true,
Expand Down
14 changes: 12 additions & 2 deletions docs/src/site.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@ export const SITE = "https://docs.bounda.dev";

export const REPOSITORY = "https://github.com/bounda-dev/bounda";

// Cloudflare Web Analytics, without cookies; the site is bounda.dev's, which counts this subdomain too.
export const analytics: HeadTag = {
tag: "script",
attrs: {
type: "module",
src: "https://static.cloudflareinsights.com/beacon.min.js",
"data-cf-beacon": '{"token": "26093f976db946eeba633b04b7def982"}',
},
};

export const DESCRIPTION = "Event sourcing and CQRS for TypeScript without the ceremony.";

// What a page hands to a chat; `{url}` becomes the page's address.
Expand All @@ -15,8 +25,8 @@ const socialImageAlt =
"The Bounda symbol as a machined monolith whose foot becomes the global stream, beside the headline: Event sourcing without the ceremony.";

export interface HeadTag {
readonly tag: "meta";
readonly attrs: { readonly property?: string; readonly name?: string; readonly content: string };
readonly tag: "meta" | "script";
readonly attrs: Readonly<Record<string, string | undefined>>;
}

export interface SocialImageFunction {
Expand Down
Loading