Skip to content

Commit af388b2

Browse files
fix(links): add trailing slashes to internal page hrefs
next.config.ts sets trailingSlash: true, so /about and /learnmore canonicalize to /about/ and /learnmore/. Matching that in hrefs skips a server-side 301 round-trip and keeps internal links consistent with the static export's canonical URLs. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent ca75aee commit af388b2

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎app/about/page.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export default function AboutPage() {
5252
</div>
5353

5454
<a
55-
href="/learnmore"
55+
href="/learnmore/"
5656
className="inline-flex items-center gap-1 text-sm font-mono text-primary/70 hover:text-primary transition-colors underline underline-offset-4"
5757
>
5858
Read more →

‎components/about.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export function About() {
4545
</div>
4646

4747
<a
48-
href="/learnmore"
48+
href="/learnmore/"
4949
className="inline-flex items-center gap-1 text-sm font-mono text-primary/70 hover:text-primary transition-colors underline underline-offset-4"
5050
>
5151
Read more →

‎components/footer.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export function Footer() {
2222
</h3>
2323
<nav className="flex flex-col gap-1.5 sm:gap-2">
2424
<a
25-
href="/about"
25+
href="/about/"
2626
className="text-xs sm:text-sm font-mono text-foreground/70 hover:text-primary transition-colors text-left"
2727
>
2828
&gt; About_Us

‎components/hero.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ export function Hero() {
8383
work with human-AI multi-agent systems across most of our projects.
8484
</p>
8585
<Button asChild variant="outline" size="sm" className="mt-2">
86-
<a href="/about">Learn more</a>
86+
<a href="/about/">Learn more</a>
8787
</Button>
8888
</div>
8989

0 commit comments

Comments
 (0)