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
8 changes: 7 additions & 1 deletion astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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',
Expand Down
66 changes: 66 additions & 0 deletions src/components/SiteTitle.astro
Original file line number Diff line number Diff line change
@@ -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';
---

<a href={siteTitleHref} class="site-title sl-flex">
{
config.logo && logos.dark && (
<>
<img
class:list={{ 'light:sl-hidden print:hidden': !('src' in config.logo) }}
alt={config.logo.alt}
src={logos.dark.src}
width={logos.dark.width}
height={logos.dark.height}
/>
{!('src' in config.logo) && (
<img
class="dark:sl-hidden print:block"
alt={config.logo.alt}
src={logos.light?.src}
width={logos.light?.width}
height={logos.light?.height}
/>
)}
</>
)
}
<span class:list={{ 'sr-only': config.logo?.replacesTitle }} translate="no">
{navTitle}
</span>
</a>

<style>
@layer starlight.core {
.site-title {
align-items: center;
gap: var(--sl-nav-gap);
font-size: var(--sl-text-h4);
font-weight: 600;
color: var(--sl-color-text-accent);
text-decoration: none;
white-space: nowrap;
min-width: 0;
}
span {
overflow: hidden;
}
img {
height: calc(var(--sl-nav-height) - 2 * var(--sl-nav-pad-y));
width: auto;
max-width: 100%;
object-fit: contain;
object-position: 0 50%;
}
}
</style>
6 changes: 5 additions & 1 deletion src/content/docs/index.mdx
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Loading