Skip to content

Commit fc1e136

Browse files
groksrcclaude
andcommitted
Fix page titles and sidebar external link styling
- Fix page title format to match original site (homepage shows just "Basic Memory", other pages show "{Title} - Basic Memory") - Handle undefined title values and MDX frontmatter passing - Add rounded borders around sidebar external link icons only - Implement hover effect with black background and white icon/text - Reduce icon container size from 32px to 24px for tighter borders - Lighten icon colors from gray-600 to gray-400 - Add proper spacing between external links 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent bdedee6 commit fc1e136

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

src/components/Sidebar.astro

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,20 @@ const currentPath = Astro.url.pathname
99
<nav class="sticky top-16 h-[calc(100vh-4rem)] overflow-y-auto py-6 pr-6 pl-8">
1010
<div class="space-y-6">
1111
<!-- Top links section -->
12-
<div class="space-y-1">
12+
<div class="space-y-2">
1313
{navConfig.sidebarTopLinks.map((link) => (
1414
<a
1515
href={link.href}
1616
target={link.external ? "_blank" : undefined}
1717
rel={link.external ? "noopener noreferrer" : undefined}
18-
class="flex items-center gap-3 px-3 py-1.5 text-sm text-gray-600 hover:text-gray-900 transition-colors no-underline"
18+
class="flex items-center gap-3 px-3 py-1.5 text-sm text-gray-500 hover:text-gray-900 transition-colors no-underline group"
1919
style="text-decoration: none"
2020
>
21-
{link.icon && <Icon name={link.icon} class="w-4 h-4" />}
21+
{link.icon && (
22+
<div class="flex items-center justify-center w-6 h-6 rounded-md border border-gray-200 group-hover:bg-black group-hover:border-black transition-all">
23+
<Icon name={link.icon} class="w-4 h-4 text-gray-400 group-hover:text-white" />
24+
</div>
25+
)}
2226
<span>{link.title}</span>
2327
</a>
2428
))}

src/layouts/DocsLayout.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export interface Props {
1010
description?: string
1111
}
1212
13-
const { title, description } = Astro.props
13+
const { title, description } = Astro.props.frontmatter || Astro.props
1414
---
1515

1616
<Layout title={title} description={description}>

src/layouts/Layout.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export interface Props {
66
description?: string
77
}
88
9-
const { title, description = 'Basic Memory - Persistent memory for Claude AI' } = Astro.props
9+
const { title = 'Basic Memory', description = 'Basic Memory - Persistent memory for Claude AI' } = Astro.props
1010
---
1111

1212
<!DOCTYPE html>
@@ -20,7 +20,7 @@ const { title, description = 'Basic Memory - Persistent memory for Claude AI' }
2020
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap" rel="stylesheet" />
2121
<meta name="generator" content={Astro.generator} />
2222
<meta name="description" content={description} />
23-
<title>Basic Memory - {title}</title>
23+
<title>{!title || title === 'Basic Memory' ? 'Basic Memory' : `${title} - Basic Memory`}</title>
2424
</head>
2525
<body>
2626
<slot />

0 commit comments

Comments
 (0)