From dbba736a003031b0c32a7f95cdd23b78ad2506dc Mon Sep 17 00:00:00 2001 From: Raymond Khalife Date: Thu, 23 Apr 2026 13:04:52 -0400 Subject: [PATCH 1/4] refactor(branding): centralize shared branding strings in src/branding.mjs Title, description, publisher, and OG alt text were duplicated across astro.config.mjs and plugins/astro-agent-docs.mjs (metadata, JSON-LD, llms.txt, and RSS feed). Consolidated into a single module so a rebrand or copy tweak is a one-line edit. --- astro.config.mjs | 15 ++++++++------- plugins/astro-agent-docs.mjs | 13 +++++++------ src/branding.mjs | 8 ++++++++ 3 files changed, 23 insertions(+), 13 deletions(-) create mode 100644 src/branding.mjs diff --git a/astro.config.mjs b/astro.config.mjs index 0f31898f..0d47e8ea 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -9,6 +9,7 @@ import remarkHeadingId from "./plugins/remark-heading-id.mjs"; import remarkPlantUML from "./plugins/remark-plantuml.mjs"; import agentDocs from "./plugins/astro-agent-docs.mjs"; import { sidebar } from "./sidebar.mjs"; +import { TITLE, DESCRIPTION, PUBLISHER, OG_ALT } from "./src/branding.mjs"; // https://astro.build/config export default defineConfig({ @@ -21,7 +22,7 @@ export default defineConfig({ }, integrations: [ starlight({ - title: "ICP Developer Docs", + title: TITLE, components: { EditLink: "./src/components/EditLink.astro", Footer: "./src/components/Footer.astro", @@ -42,7 +43,7 @@ export default defineConfig({ attrs: { rel: "alternate", type: "application/rss+xml", - title: "ICP Developer Docs", + title: TITLE, href: "/feed.xml", }, }, @@ -52,7 +53,7 @@ export default defineConfig({ }, { tag: "meta", - attrs: { name: "author", content: "DFINITY Foundation" }, + attrs: { name: "author", content: PUBLISHER }, }, { tag: "meta", @@ -60,7 +61,7 @@ export default defineConfig({ }, { tag: "meta", - attrs: { property: "og:image:alt", content: "ICP Developer Docs — Build on Internet Computer" }, + attrs: { property: "og:image:alt", content: OG_ALT }, }, { tag: "meta", @@ -75,15 +76,15 @@ export default defineConfig({ { "@type": "WebSite", "@id": "https://beta-docs.internetcomputer.org/#website", - "name": "ICP Developer Docs", - "description": "Developer documentation for building full-stack web applications, DeFi protocols, and cross-chain integrations on the Internet Computer.", + "name": TITLE, + "description": DESCRIPTION, "url": "https://beta-docs.internetcomputer.org", "publisher": { "@id": "https://beta-docs.internetcomputer.org/#organization" }, }, { "@type": "Organization", "@id": "https://beta-docs.internetcomputer.org/#organization", - "name": "DFINITY Foundation", + "name": PUBLISHER, "url": "https://dfinity.org", }, ], diff --git a/plugins/astro-agent-docs.mjs b/plugins/astro-agent-docs.mjs index 5508310b..ddff8204 100644 --- a/plugins/astro-agent-docs.mjs +++ b/plugins/astro-agent-docs.mjs @@ -18,6 +18,7 @@ import { fileURLToPath } from "node:url"; import { glob } from "glob"; import matter from "gray-matter"; import { sidebar } from "../sidebar.mjs"; +import { TITLE, DESCRIPTION, PUBLISHER } from "../src/branding.mjs"; import { extractSnippet } from "./remark-snippet.mjs"; /** @@ -360,9 +361,9 @@ function generateLlmsTxt(pages, siteUrl) { "https://skills.internetcomputer.org/.well-known/skills"; const lines = [ - "# ICP Developer Docs", + `# ${TITLE}`, "", - "> Developer documentation for building full-stack web applications, DeFi protocols, and cross-chain integrations on the Internet Computer.", + `> ${DESCRIPTION}`, "", "## Agent skills", "", @@ -552,11 +553,11 @@ export default function agentDocs() { '', '', " ", - " ICP Developer Docs", + ` ${escapeXml(TITLE)}`, ` ${base}/`, - " Developer documentation for building full-stack web applications, DeFi protocols, and cross-chain integrations on the Internet Computer.", + ` ${escapeXml(DESCRIPTION)}`, " en-us", - " DFINITY Foundation", + ` ${escapeXml(PUBLISHER)}`, ` ${new Date().toUTCString()}`, channelPubDate ? ` ${new Date(channelPubDate.date).toUTCString()}` @@ -574,7 +575,7 @@ export default function agentDocs() { ? ` ${new Date(item.date).toUTCString()}` : "", ` ${item.url}`, - " DFINITY Foundation", + ` ${escapeXml(PUBLISHER)}`, " ", ] .filter(Boolean) diff --git a/src/branding.mjs b/src/branding.mjs new file mode 100644 index 00000000..8fd9e783 --- /dev/null +++ b/src/branding.mjs @@ -0,0 +1,8 @@ +// Shared branding strings used across astro.config.mjs and build-time plugins. +// Edit here to change site title, description, or publisher everywhere. + +export const TITLE = "ICP Developer Docs"; +export const DESCRIPTION = + "Developer documentation for building full-stack web applications, DeFi protocols, and cross-chain integrations on the Internet Computer."; +export const PUBLISHER = "DFINITY Foundation"; +export const OG_ALT = "ICP Developer Docs — Build on Internet Computer"; From a211bdb093825e0e7af83ca2427dc0198a7cb29f Mon Sep 17 00:00:00 2001 From: Raymond Khalife Date: Thu, 23 Apr 2026 13:58:53 -0400 Subject: [PATCH 2/4] docs(branding): rewrite DESCRIPTION and OG_ALT in ICP voice - DESCRIPTION: swap "applications" for "apps" and lean into frontier-cloud framing - OG_ALT: replace em-dash with a colon per brand guidelines --- src/branding.mjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/branding.mjs b/src/branding.mjs index 8fd9e783..7b169bbf 100644 --- a/src/branding.mjs +++ b/src/branding.mjs @@ -3,6 +3,6 @@ export const TITLE = "ICP Developer Docs"; export const DESCRIPTION = - "Developer documentation for building full-stack web applications, DeFi protocols, and cross-chain integrations on the Internet Computer."; + "Developer documentation for the Internet Computer: the frontier cloud where apps stay tamperproof and online."; export const PUBLISHER = "DFINITY Foundation"; -export const OG_ALT = "ICP Developer Docs — Build on Internet Computer"; +export const OG_ALT = "ICP Developer Docs: build on the Internet Computer"; From 307280baec5516aca1b5761aac48b5fb4ba3a4a2 Mon Sep 17 00:00:00 2001 From: Raymond Khalife Date: Thu, 23 Apr 2026 14:22:50 -0400 Subject: [PATCH 3/4] fix description --- src/branding.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/branding.mjs b/src/branding.mjs index 7b169bbf..719d6222 100644 --- a/src/branding.mjs +++ b/src/branding.mjs @@ -3,6 +3,6 @@ export const TITLE = "ICP Developer Docs"; export const DESCRIPTION = - "Developer documentation for the Internet Computer: the frontier cloud where apps stay tamperproof and online."; + "Developer documentation for the Internet Computer: the frontier cloud for agents building apps, services, and systems."; export const PUBLISHER = "DFINITY Foundation"; export const OG_ALT = "ICP Developer Docs: build on the Internet Computer"; From d53b997b09e37e8e142de2ef40b412cf7bd12146 Mon Sep 17 00:00:00 2001 From: Raymond Khalife Date: Thu, 23 Apr 2026 15:19:08 -0400 Subject: [PATCH 4/4] use suggestion from dashboard --- src/branding.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/branding.mjs b/src/branding.mjs index 719d6222..b4e328af 100644 --- a/src/branding.mjs +++ b/src/branding.mjs @@ -3,6 +3,6 @@ export const TITLE = "ICP Developer Docs"; export const DESCRIPTION = - "Developer documentation for the Internet Computer: the frontier cloud for agents building apps, services, and systems."; + "Developer documentation for building full-stack web applications, digital assets and payments, and cross-chain integrations on the Internet Computer."; export const PUBLISHER = "DFINITY Foundation"; export const OG_ALT = "ICP Developer Docs: build on the Internet Computer";