No custom 404 page: unknown URLs show GitHub's generic page with no way back

Offen Anfängerfreundlich
#77 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
1/5
Geschätzter Aufwand
Unter einer Stunde
Anfängerfreundlichkeit
88/100
Issue-Typ
Feature
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
css, html, javascript
Bereich
frontend

Rechercherichtung

Das Issue fordert eine neue 404.html im Repository-Root an, die GitHub Pages für unbekannte Pfade ausliefert. Lies index.html und css/style.css, um das Erscheinungsbild der Seite wiederzuverwenden, und verwende absolute Pfade wie /Static_Chess/css/style.css und /Static_Chess/, damit Links in jeder Tiefe funktionieren. Fertig ist es, wenn eine unbekannte URL unter /Static_Chess/ eine gestaltete Seite mit einem funktionierenden Link zurück zum Spiel anzeigt; bestätige, dass die Antwort weiterhin 404 ist, und führe npm test aus.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

enhancement good first issue severity: low

Summary

The site has no 404.html, so a mistyped or outdated URL under /Static_Chess/ shows GitHub's generic "File not found" page, which has no link back to the game.

Where

  • 404.html does not exist in the repository root
  • Live example: https://tmhsdigital.github.io/Static_Chess/nope-404

Details

The Pages API reports custom_404: false. The page served for an unknown path is titled "Page not found · GitHub Pages" and contains no link to any URL on this site.

Impact

A visitor who follows a broken link has to edit the address by hand to reach the game.

Steps to reproduce

  1. Open https://tmhsdigital.github.io/Static_Chess/nope-404.

Suggested fix

Add a small 404.html at the repository root that uses the site's stylesheet and links to the game. GitHub Pages serves it for unknown paths at any depth, so use absolute paths in it (/Static_Chess/css/style.css, /Static_Chess/), because relative ones break for URLs such as /Static_Chess/a/b.

Acceptance criteria

  • An unknown URL under /Static_Chess/ shows a page in the site's style with a working link to the game
  • The response status is still 404

Getting started

  • Relevant files: index.html, css/style.css
  • How to run tests: npm test, npm run format

Filed by repo-audit/pages-audit at 0144de7. Severity: low. Effort: S. audit-key: enhancement|404.html|custom-404

Vorherrschende Sprache
JavaScript
Sterne
4
Forks
2
Ø Merge
4 Std. 8 Min.
Gemergte PRs (30 T.)
1

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus TMHSDigital/Static_Chess

Alle Issues in TMHSDigital/Static_Chess

Ähnliche Issues

Weitere Issues zu JavaScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.