GitHub Pages publishes the whole repo: dev files and stray Jekyll pages
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 72/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- github
- Ambito
- devops
Direzione di ricerca
Il problema è che la build di GitHub Pages pubblica ogni file tracciato. Parti dalla radice del repository, dove si troverebbe un _config.yml, e controlla sw.js per l'elenco dei file di cui il gioco ha bisogno prima di escludere qualcosa. Leggi la sezione Deployment di README.md e conferma che index.html è l'unica pagina che deve essere servita. È completato quando i percorsi nei criteri di accettazione (package.json, tests/unit/ai.test.js, README.md, CHANGELOG.html) restituiscono 404 sul sito live, il gioco e ogni file in sw.js restituiscono ancora 200 e il gioco funziona ancora offline.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- JavaScript
- Stelle
- 4
- Fork
- 2
- Merge medio
- 4h 8m
- PR unite (30g)
- 1
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di TMHSDigital/Static_Chess
-
documentation good first issue severity: low
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
TMHSDigital/Static_Chess#79 ·
-
enhancement good first issue severity: low
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
TMHSDigital/Static_Chess#77 ·
-
enhancement good first issue severity: low
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
TMHSDigital/Static_Chess#76 ·
-
enhancement good first issue severity: low
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
TMHSDigital/Static_Chess#72 ·
-
documentation good first issue severity: low
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
TMHSDigital/Static_Chess#49 ·
Tutte le issue di TMHSDigital/Static_Chess
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
I maintainer di solito rispondono entro 1 giorno
-
discovery:other factory-active task-identify-harness-labels-done task-identify-issue-type-done
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
vercel/ai#25068 · 4 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
needs-triage typo
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
llm-d-incubation/llm-d-scaling-manager#122 ·
I maintainer di solito rispondono entro 1 giorno
-
create-strapi-app doesn't await writing license.txt, so a failed write skips its error handlingApertaflag: invalid template issue: bug severity: low source: cli status: pending reproduction version: 5
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
strapi/strapi#28637 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni