Skip to content

Conversation

@Crokily
Copy link
Contributor

@Crokily Crokily commented Sep 18, 2025

#62

效果:

image image

改动内容:

lib下加了个github.ts用于获取贡献者数据,该接口需要配置一个github账号的personal access token 在环境变量(GITHUB_TOKEN=github_pat_xxxxxxxxxxxxxx)里,需要 @longsizhuo 在vercel里配置一下,增加了一个.env.sapmle用于指示
然后添加了一个contributors组件,即该贡献者组件,该组件在未获取到贡献者数据时不会显示在页内,因此在接口异常时不会对页面造成影响

破坏性改动:

global.css中之前被配置了清除所有圆角样式的代码,这段代码会强制影响后续所有圆形组件,不建议这么使用,删去了这段代码,然后页内出现了一些纯矩形和带圆角的组件,因此后续需要团队讨论统一样式设计,是有圆角设计,还是纯矩形,再另开分支处理。

@Crokily Crokily self-assigned this Sep 18, 2025
@Crokily Crokily added the enhancement New feature or request label Sep 18, 2025
@Crokily Crokily added this to Frontend Sep 18, 2025
@vercel
Copy link

vercel bot commented Sep 18, 2025

@Crokily is attempting to deploy a commit to the longsizhuo's projects Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Contributor

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

This PR adds a contributors feature that displays GitHub contributors for each documentation page, along with some style adjustments. The feature fetches contributor data from the GitHub API and renders it at the bottom of doc pages.

  • Added GitHub API integration to fetch contributors by file path
  • Created a Contributors component to display contributor avatars and names
  • Removed global CSS rules that forced all rounded corners to be square

Reviewed Changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
lib/github.ts New GitHub API client with caching for fetching contributors
app/components/Contributors.tsx New component to render contributor list with avatars
app/docs/[...slug]/page.tsx Integration of contributors feature into doc pages
app/globals.css Removed global rounded corner override styles
.env.sample Added sample environment variable for GitHub token

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Crokily and others added 4 commits September 18, 2025 16:58
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@longsizhuo longsizhuo merged commit 3b8b284 into InvolutionHell:main Sep 18, 2025
2 of 3 checks passed
@github-project-automation github-project-automation bot moved this to Done in Frontend Sep 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants