diff --git a/astro.config.mjs b/astro.config.mjs index 3105212..a713f6c 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -9,7 +9,7 @@ export default defineConfig({ site: 'https://docs.memaudit.dev', integrations: [ starlight({ - title: 'memaudit docs', + title: 'memaudit documentation', logo: { src: './src/assets/logo.svg', alt: 'memaudit', @@ -20,6 +20,12 @@ export default defineConfig({ { icon: 'github', label: 'GitHub', href: 'https://github.com/memaudit/memaudit' }, ], plugins: [starlightLinksValidator()], + components: { + // Shows "memaudit" in the visible nav header while the + // site title above ("memaudit documentation") still + // drives the browser tab title and other metadata. + SiteTitle: './src/components/SiteTitle.astro', + }, sidebar: [ { label: 'Reference', diff --git a/src/components/SiteTitle.astro b/src/components/SiteTitle.astro new file mode 100644 index 0000000..718c38e --- /dev/null +++ b/src/components/SiteTitle.astro @@ -0,0 +1,66 @@ +--- +// SPDX-FileCopyrightText: 2026 the memaudit authors +// SPDX-License-Identifier: Apache-2.0 +// +// Overrides Starlight's default SiteTitle component to show a shorter +// name in the visible nav header ("memaudit") than the site's configured +// title ("memaudit documentation"), which still drives the browser tab +// title and other metadata. See https://starlight.astro.build/guides/overriding-components/ +import { logos } from 'virtual:starlight/user-images'; +import config from 'virtual:starlight/user-config'; +const { siteTitleHref } = Astro.locals.starlightRoute; +const navTitle = 'memaudit'; +--- + + + { + config.logo && logos.dark && ( + <> + {config.logo.alt} + {!('src' in config.logo) && ( + {config.logo.alt} + )} + + ) + } + + {navTitle} + + + + diff --git a/src/content/docs/index.mdx b/src/content/docs/index.mdx index 0e753d4..f6e2da8 100644 --- a/src/content/docs/index.mdx +++ b/src/content/docs/index.mdx @@ -1,8 +1,12 @@ --- -title: See where your DRAM actually goes +title: memaudit documentation description: Reference documentation for memauditd, the read-only host agent for measuring cold memory, stranded DRAM, and KV-cache waste on Linux. +head: + - tag: title + content: memaudit documentation template: splash hero: + title: memaudit tagline: See where your DRAM actually goes. actions: - text: Config reference