Under Construction
Go to file
vercel[bot] abde4a8603
feat: Install and configure Vercel Web Analytics (#70)
Implemented Vercel Web Analytics Integration

SUMMARY:
Successfully integrated Vercel Web Analytics into the Docusaurus 2 project following the user's specifications.

CHANGES MADE:

1. Installed @vercel/analytics package
   - Executed: npm install @vercel/analytics
   - Added @vercel/analytics to package.json dependencies
   - Updated package-lock.json with dependency resolution

2. Modified src/pages/index.js (Home page component)
   - Added import for useEffect from React: `import { useEffect } from 'react';`
   - Added import for inject from @vercel/analytics: `import { inject } from '@vercel/analytics';`
   - Added useEffect hook in the Home component to initialize Vercel Analytics on component mount
   - The inject() function runs on the client side as required, with empty dependency array to ensure it runs once

IMPLEMENTATION DETAILS:

The Vercel Web Analytics configuration was added to the main homepage component since this is a Docusaurus 2 site. The inject() function is called within a useEffect hook with an empty dependency array [], ensuring it runs once when the component mounts on the client side.

The implementation follows React best practices:
- Uses useEffect for client-side initialization
- Empty dependency array ensures the analytics initializer runs once
- No route-specific configuration needed (as per user requirements)
- Minimal and non-intrusive changes to existing code

TESTING:

✓ Build completed successfully with no errors
✓ All webpack compilation warnings are pre-existing (LaTeX and Docusaurus-related)
✓ Static files generated without issues
✓ No linter errors introduced (no linter configured in project)

FILES MODIFIED:
- package.json - Added @vercel/analytics dependency
- package-lock.json - Updated with dependency resolution
- src/pages/index.js - Added Vercel Analytics initialization

VERIFICATION:
- Build: npm run build ✓ PASSED
- Package installation: npm install @vercel/analytics ✓ PASSED
- All changes preserve existing code structure and functionality

Co-authored-by: Vercel <vercel[bot]@users.noreply.github.com>
2025-12-14 03:50:21 +08:00
.github ci: Modify PR Build Check workflow triggers 2025-11-20 23:14:21 +08:00
blog feat(blog): 方案外实习认定为劳动与创造学分 2025-11-21 00:03:05 +08:00
docs fix: 形式化语言与自动机理论的名称与代码的更新 2025-12-10 18:26:45 +08:00
src feat: Install and configure Vercel Web Analytics (#70) 2025-12-14 03:50:21 +08:00
static fix: 更换主页Svg 2025-11-21 16:57:37 +08:00
.gitattributes chore: gitattributes 2025-09-02 15:55:44 +08:00
.gitignore feat: 添加页面最后更新信息 (#66) 2025-11-30 14:50:51 +08:00
CODE_OF_CONDUCT.md docs: coc code for docusaurus close #20 2025-09-11 11:48:36 +08:00
CONTRIBUTING.md docs: coc code for docusaurus close #20 2025-09-11 11:48:36 +08:00
README.md docs: delete stars budge 2025-09-25 01:27:12 +08:00
docusaurus.config.js feat: 添加页面最后更新信息 (#66) 2025-11-30 14:50:51 +08:00
package-lock.json feat: Install and configure Vercel Web Analytics (#70) 2025-12-14 03:50:21 +08:00
package.json feat: Install and configure Vercel Web Analytics (#70) 2025-12-14 03:50:21 +08:00
sidebars.js wip: Add course code(if exits) (#46) 2025-10-20 19:42:23 +08:00

README.md

ECNU·课栈Docusaurus

GitHub Issues or Pull Requests GitHub repo size

本项目起源于 タクヤマECNU_Crypt_Student_Manual
Eagle233 提出整合想法, 并建立第一版仓库 ECNU-SharedCourses
经由 KirisameVanilla 重构, 最终呈现为本仓库.

项目简介

本项目旨在为华东师范大学学生提供统一, 开放的课程资料共享平台, 集中整理, 公开共享各类课程资源, 欢迎所有人参与贡献.

快速开始

  1. 访问 courses.myecnu.orgcourses.vanillaaaa.org 浏览和下载资料
  2. 贡献资料: Fork 本仓库, 按命名规范添加资料, 提交 PR, 等待审核合并

贡献指南

点我查看贡献指南

贡献者

Contributors

项目结构

docs/
├── undergraduate/  # 本科生课程资料目录
├── postgraduate/   # 研究生课程资料目录
└── README.md       # docs 路由中的置顶文档

研究生资料来源于 tianyilt/ecnu-PGCourseShare, BetterECNU 团队仅是收录并且更改了索引文档以适用于 docusaurus 框架

联系我们

如有问题或建议, 欢迎通过 Issue(推荐)邮件 联系我们.

致谢