HBASE-30010 Edit on GitHub link Not Found#7961
HBASE-30010 Edit on GitHub link Not Found#7961liuxiaocs7 wants to merge 1 commit intoapache:masterfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Fixes the “Edit on GitHub” link in the docs UI (HBASE-30010) by updating the generated GitHub URL to point at GitHub’s edit view.
Changes:
- Update the “Edit on GitHub” anchor to use a GitHub
/edit/<branch>/...URL instead of linking directly under the repo root.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| {route !== undefined && ( | ||
| <a | ||
| href={`https://github.com/apache/hbase/${baseGithubPath}${mdxFileRoute}`} | ||
| href={`https://github.com/apache/hbase/edit/master/${baseGithubPath}${mdxFileRoute}`} | ||
| rel="noreferrer noopener" | ||
| target="_blank" |
There was a problem hiding this comment.
The new GitHub URL uses /edit/master/ but mdxFileRoute can be empty for single-page routes and can point to a non-existent file for grouped section roots (e.g., /docs/architecture resolves to architecture.mdx even though the repo has architecture/index.mdx). In both cases this will still produce a GitHub 404. Consider deriving the actual source file path based on the route: use the single-page/index.mdx file for single-page views, and use ${trimmedRoute}/index.mdx (or equivalent) when the route maps to a directory index page, so the edit link always targets a real file.
|
Hi, @yuriipalam, could you help take a look when free, thanks! |
PDavid
left a comment
There was a problem hiding this comment.
Many thanks for fixing this. 👍
Uh oh!
There was an error while loading. Please reload this page.