Skip to content
Merged
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
12 changes: 12 additions & 0 deletions hbase-website/app/pages/_docs/docs/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,18 @@ const renderer = toClientRenderer(
}
}

// Bare fragment links must use a plain <a> — React Router's Link resolves
// to="#fragment" relative to the current pathname, producing e.g.
// /docs/single-page#transactions, which Chrome embeds as an absolute
// localhost URL in PDFs instead of an internal GoTo annotation.
if (transformedHref?.startsWith("#")) {
return (
<a href={transformedHref} {...rest}>
{children}
</a>
);
}

// Use default Link component for all links (external links are handled by Link component)
return (
<Link to={transformedHref ?? "#"} {...rest}>
Expand Down