-
Notifications
You must be signed in to change notification settings - Fork 40
添加Edit button,打包github相关函数,lint了文本 #58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
Copilot
AI
Sep 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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