-
Notifications
You must be signed in to change notification settings - Fork 3
Add soft 404 page with trailing slash detection #350
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Co-authored-by: cubap <1119165+cubap@users.noreply.github.com>
Co-authored-by: cubap <1119165+cubap@users.noreply.github.com>
Co-authored-by: cubap <1119165+cubap@users.noreply.github.com>
Co-authored-by: cubap <1119165+cubap@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix soft 404 for trailing slash errors
Add soft 404 page with trailing slash detection
Dec 15, 2025
Corrects the image source path in 404.html to use /assets/images/hopeful404.png and adds the corresponding image file to the assets/images directory.
Contributor
Renamed 'hopeful404 .png' to 'hopeful404.png' in the assets/images directory to correct the filename and remove the extra space.
Enhanced the 404 page logic to suggest correct URLs not only for trailing slash errors, but also for case-insensitive mismatches and fuzzy matches where path segments have the same first two characters and the remaining letters are rearranged. Updated the UI to display more specific reasons for near matches and refactored the JavaScript for clarity.
Member
|
This is the silliest address I think I'm willing to fix: https://6940537034b5f21a6f3eb3dd--tpen-interfaces-preview.netlify.app/prOflie/?projectPotato=WhoCares&ridiculousPayload=false
|
cubap
approved these changes
Dec 15, 2025
Reordered sections and improved formatting in 404.html, including moving the standard 404 message below helpful links and adding more known paths for suggestions.
cubap
approved these changes
Dec 15, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
GitHub Pages serves 404s when users add trailing slashes to permalink paths (e.g.,
/transcribe/vs/transcribe). This creates a poor UX for a common mistake.Changes
Created
/404.html- Jekyll 404 page with client-side logic:Created
/assets/img/with README documenting requiredhopeful404.pngimageHow it works
Manual step required
Download hopeful404.png to
/assets/img/hopeful404.png. Page uses fallback image (404_PageNotFound.jpeg) until added.Maintenance
Update
knownPathsarray in 404.html when adding new pages with permalinks.Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
github-production-user-asset-6210df.s3.amazonaws.com/usr/bin/curl curl -L -o hopeful404.png REDACTED(dns block)/usr/bin/wget wget -O hopeful404.png REDACTED(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.