This is an automated email from the ASF dual-hosted git repository.
paksyd pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/master by this push:
new 201c0d4690a HBASE-30017 Links lead to localhost in generated PDF docs
(#7976)
201c0d4690a is described below
commit 201c0d4690adec1aa65e8c8dff0bd3fd4fa250f4
Author: Yurii Palamarchuk <[email protected]>
AuthorDate: Thu Mar 26 09:29:14 2026 +0100
HBASE-30017 Links lead to localhost in generated PDF docs (#7976)
Signed-off-by: Dávid Paksy <[email protected]>
---
hbase-website/app/pages/_docs/docs/index.tsx | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/hbase-website/app/pages/_docs/docs/index.tsx
b/hbase-website/app/pages/_docs/docs/index.tsx
index 4bb6cad4b22..073c6c4dfaa 100644
--- a/hbase-website/app/pages/_docs/docs/index.tsx
+++ b/hbase-website/app/pages/_docs/docs/index.tsx
@@ -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}>