comphy-lab / comphy-lab/comphy-lab.github.io

Deduplicate layout script tags and enforce JS dependency order

未关闭
#65 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
codex
主要语言
CSS
星标
0
派生
0
平均合并
1 小时 16 分钟
30 天内合并 PR
3

描述

## Why
Multiple PRs repeatedly surfaced duplicate script includes and dependency-order regressions across layouts.

## Evidence
- PR #58 reviews: duplicate includes (`main.js`, `command-palette.js`) and missing `utils.js`/`search-manager.js` in some layouts.
- PR #62 review: duplicate `command-palette.js` include noted in teaching layout.

## Scope
- Audit `_layouts/*.html` for duplicated script tags.
- Ensure dependency order: `utils.js` and `search-manager.js` load before scripts that consume them.
- Remove redundant includes in affected layouts (`teaching`, `teaching-course`, `team`, `research`, `history` as needed).
- Add a small CI guard script/check to catch duplicate includes and order violations.

## Acceptance Criteria
- No layout has duplicate includes for `main.js` or `command-palette.js`.
- Pages depending on `window.Utils` and `window.SearchManager` always load those first.
- CI fails when duplicate includes or invalid ordering is introduced.

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。