Skip to content

HBASE-30010 Edit on GitHub link Not Found#7961

Open
liuxiaocs7 wants to merge 1 commit intoapache:masterfrom
liuxiaocs7:HBASE-30010
Open

HBASE-30010 Edit on GitHub link Not Found#7961
liuxiaocs7 wants to merge 1 commit intoapache:masterfrom
liuxiaocs7:HBASE-30010

Conversation

@liuxiaocs7
Copy link
Contributor

@liuxiaocs7 liuxiaocs7 commented Mar 20, 2026

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines 257 to 261
{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"
Copy link

Copilot AI Mar 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
@liuxiaocs7
Copy link
Contributor Author

Hi, @yuriipalam, could you help take a look when free, thanks!

Copy link
Contributor

@PDavid PDavid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Many thanks for fixing this. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants