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

Open Beginner friendly
#77 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
88/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
css, html, javascript
Domain
frontend

Research direction

The issue asks for a new 404.html at the repository root, which GitHub Pages serves for unknown paths. Read index.html and css/style.css to reuse the site's look, and use absolute paths such as /Static_Chess/css/style.css and /Static_Chess/ so links work at any depth. Done when an unknown URL under /Static_Chess/ shows a styled page with a working link back to the game; confirm the response is still 404 and run npm test.

Written by the indexing model from the issue text.

Description

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

Dominant language
JavaScript
Stars
4
Forks
2
Avg merge
4h 8m
Merged PRs (30d)
1

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from TMHSDigital/Static_Chess

All issues in TMHSDigital/Static_Chess

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.