Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull Request Overview
This PR adds an "Edit on GitHub" button to documentation pages and refactors GitHub-related functionality into a centralized utility module. The changes improve code maintainability by consolidating GitHub constants and URL generation logic while adding user-friendly editing capabilities.
- Centralized GitHub utility functions in a dedicated module with proper URL encoding for Chinese characters
- Added "Edit on GitHub" button component with Material Icons styling to documentation pages
- Refactored existing contribution form to use the new utility functions
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| lib/github.ts | New utility module containing GitHub constants and URL generation functions |
| app/layout.tsx | Added Google Material Icons font for the edit button |
| app/docs/[...slug]/page.tsx | Integrated edit button into documentation page layout |
| app/components/EditOnGithub.tsx | New reusable edit button component |
| app/components/Contribute.tsx | Refactored to use centralized GitHub utility functions |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| aria-label="Edit on GitHub" | ||
| > | ||
| <span | ||
| aria-hidden |
There was a problem hiding this comment.
The aria-hidden attribute should have a value. It should be aria-hidden="true" to properly hide the decorative icon from screen readers.
| aria-hidden | |
| aria-hidden="true" |
e4b4ef3 to
bbe317b
Compare


本次更改需要回测主页投稿按钮;
新增每一页右上角的Edit Button