GitHub Pages publishes the whole repo: dev files and stray Jekyll pages
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 72/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- github
- Lĩnh vực
- devops
Hướng nghiên cứu
Vấn đề là bản build của GitHub Pages xuất bản mọi tệp đang được theo dõi. Hãy bắt đầu ở thư mục gốc của repository, nơi sẽ đặt _config.yml, và kiểm tra sw.js để xem danh sách các tệp mà trò chơi cần trước khi loại trừ bất cứ thứ gì. Đọc mục Deployment trong README.md và xác nhận rằng index.html là trang duy nhất cần được phục vụ. Hoàn thành khi các đường dẫn trong tiêu chí chấp nhận (package.json, tests/unit/ai.test.js, README.md, CHANGELOG.html) trả về 404 trên trang trực tiếp, trò chơi và mọi tệp trong sw.js vẫn trả về 200, và trò chơi vẫn hoạt động khi ngoại tuyến.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
GitHub Pages builds the site from the root of main with Jekyll, so every tracked file is published, not only the game. Dev files are served, and each Markdown file becomes an unlinked, GitHub-themed page titled "Static_Chess" that search engines can index next to the game.
Where
- Pages settings: source
main/(root), legacy (Jekyll) build - No
_config.ymland no.nojekyllin the repository root index.html:1(the only page that is meant to be the site)
Details
Checked on the live site at 0144de7. All of these return 200:
| URL path | What it is |
|---|---|
/package.json, /package-lock.json (203 KB), /eslint.config.mjs |
dev tooling |
/tests/unit/ai.test.js, /tests/helpers/load-game.js (and the rest of tests/) |
test suite |
/README.md, /CHANGELOG.md, /docs/ARCHITECTURE.md |
raw Markdown |
/CHANGELOG.html, /docs/ARCHITECTURE.html, /docs/ROADMAP.html, /docs/RELEASE.html, /releases/, /releases/RELEASE_NOTES_v0.1.0.html, /releases/RELEASE_NOTES_v0.2.0.html, /releases/RELEASE_GUIDE_v0.1.0.html |
Jekyll-rendered pages |
The rendered pages use GitHub's default theme, not the game's styles. Their heading is the repository name Static_Chess, their <title> ends in | Static_Chess, and each one requests /Static_Chess/favicon.ico, which is a 404. Nothing on the game page links to them.
Nothing sensitive is exposed: the repository is public and these files are the same ones visible on GitHub.
Impact
- Search engines can index eight off-brand pages and the raw Markdown as part of the site.
- Every push to
mainruns a Jekyll build over files that are not part of the game. - Anything added to the repository later is published automatically, whether or not it was meant to be.
Steps to reproduce
- Open
https://tmhsdigital.github.io/Static_Chess/CHANGELOG.html. - Open
https://tmhsdigital.github.io/Static_Chess/package-lock.json.
Suggested fix
Smallest change: add a _config.yml at the repository root that excludes everything that is not the game, for example:
exclude:
- README.md
- CHANGELOG.md
- docs
- releases
- tests
- package.json
- package-lock.json
- eslint.config.mjs
Alternative: deploy with a GitHub Actions workflow that uploads only index.html, css/, js/, assets/, manifest.webmanifest and sw.js, and switch the Pages source to "GitHub Actions". This is more work and needs a settings change by a maintainer, but it publishes an explicit list instead of an exclusion list.
Acceptance criteria
-
/package.json,/package-lock.json,/tests/unit/ai.test.js,/README.mdand/CHANGELOG.htmlreturn 404 on the live site - The game at
/and every file listed insw.jsstill return 200 - The game still installs and opens offline
Getting started
- Relevant files:
index.html,sw.js(the list of files the game needs),README.md(Deployment section) - How to run tests:
npm test,npm run lint,npm run format - Related docs: GitHub Pages documentation on configuring Jekyll and on custom workflows
Filed by repo-audit/pages-audit at 0144de7. Severity: low. Effort: S. audit-key: enhancement|index.html|pages-published-files
- Ngôn ngữ chính
- JavaScript
- Star
- 4
- Fork
- 2
- Merge trung bình
- 4 giờ 8 phút
- Pull request đã merge (30 ngày)
- 1
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của TMHSDigital/Static_Chess
-
documentation good first issue severity: low
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
TMHSDigital/Static_Chess#79 ·
-
enhancement good first issue severity: low
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
TMHSDigital/Static_Chess#77 ·
-
enhancement good first issue severity: low
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
TMHSDigital/Static_Chess#76 ·
-
enhancement good first issue severity: low
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
TMHSDigital/Static_Chess#72 ·
-
documentation good first issue severity: low
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
TMHSDigital/Static_Chess#49 ·
Tất cả issue của TMHSDigital/Static_Chess
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
Maintainer thường phản hồi trong vòng 1 ngày
-
discovery:other factory-active task-identify-harness-labels-done task-identify-issue-type-done
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
vercel/ai#25068 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
needs-triage typo
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
llm-d-incubation/llm-d-scaling-manager#122 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
create-strapi-app doesn't await writing license.txt, so a failed write skips its error handlingĐang mởflag: invalid template issue: bug severity: low source: cli status: pending reproduction version: 5
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
strapi/strapi#28637 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày