Skip to content

Conversation

@xzuoqi
Copy link
Contributor

@xzuoqi xzuoqi commented Nov 10, 2025

添加脚本生成 JSON 数据,用于渲染首页

  • 百度统计:获取上周访问最多的前20个页面
  • 更新:获取文档最近的 commit 更新记录

Copy link
Contributor

@windsurf-bot windsurf-bot bot left a comment

Choose a reason for hiding this comment

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

Other comments (8)
  • static/json/baidu_tongji_data.json (12-14) There's an inconsistency in the date ranges. The `fetch_time` is 2025-11-07, `date_range` shows 20251027-20251102 (Oct 27 - Nov 2), but `timeSpan` shows 2025/11/06 - 2025/11/07. These date ranges should be aligned to ensure data consistency.
  • .github/scripts/baidu-tongji.js (290-292) In the `main()` function, errors are caught but not logged before calling `process.exit(1)`. This makes it difficult to diagnose issues when they occur. Consider logging the error message before exiting:
      } catch (error) {
        console.error('执行过程中出错:', error.message);
        process.exit(1);
      }
    
  • .github/scripts/latest-updates.js (110-113) The error handling in the catch block silently ignores errors without logging them. Consider adding error logging to help with debugging:
        } catch (e) {
          // 忽略单条失败,继续
          console.warn(`Failed to process commit ${item.sha}: ${e.message}`);
          continue;
    
  • .github/workflows/deploy.yaml (178-178) The `yarn install` command has been moved to a separate step but wasn't removed from the Build step. This could lead to duplicate installation operations. Consider removing the redundant command.
  • static/json/baidu_tongji_data.json (24-24) There are several empty arrays in the data structure (in `sum`, `pageSum`, and at the end of `items`) that don't appear to serve any purpose. Consider removing these empty arrays to make the JSON more concise and easier to maintain.
  • static/json/commit_update_data.json (8-8) I noticed that all commit entries have empty URL fields (`"url": ""`). This will prevent users from being able to click through to view the actual commits when this data is rendered on the homepage. Consider populating these URLs with links to the actual GitHub commits using the SHA values.
  • .github/workflows/deploy.yaml (180-180) The PR is downgrading from `actions/upload-pages-artifact@v4` to `v3`. Unless there's a specific compatibility issue with v4, it's generally recommended to use the latest version of GitHub Actions to benefit from bug fixes and improvements.
  • static/json/baidu_tongji_data.json (262-262) The file is missing a newline at the end. It's a common best practice to end text files with a newline character.

💡 To request another review, post a new comment with "/windsurf-review".

@xzuoqi xzuoqi requested a review from a team as a code owner November 10, 2025 06:00
Copy link
Member

@RadxaYuntian RadxaYuntian left a comment

Choose a reason for hiding this comment

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

提交历史看看能不能整理一下吧

@xzuoqi
Copy link
Contributor Author

xzuoqi commented Nov 13, 2025

提交历史看看能不能整理一下吧

整理了一下提交记录

Copy link
Member

@RadxaYuntian RadxaYuntian left a comment

Choose a reason for hiding this comment

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

以后merge commit不要留在提交历史里面

@xzuoqi
Copy link
Contributor Author

xzuoqi commented Nov 13, 2025

以后merge commit不要留在提交历史里面

OK

@xzuoqi xzuoqi merged commit 63f8c8e into radxa-docs:main Nov 17, 2025
4 of 6 checks passed
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.

2 participants