-
Notifications
You must be signed in to change notification settings - Fork 110
skip <link rel="canonical">
for 404 page
#384
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
Conversation
- Integrates with existing Jekyll layout system - Matches site color scheme and navigation - Provides helpful links for users - Includes auto-redirect for common typos
- Replace error-content with existing .masthead class - Use .lead for 404 number styling - Remove helpful-links section (redundant with nav) - Drop error-buttons class, use .flex directly - Eliminate unnecessary custom CSS classes
- Add custom 404 page with improved mobile layout - Improve mobile button text alignment and responsive design - Add proper YAML front matter for GitHub Pages compatibility - Update default layout to exclude canonical links and add noindex for 404 page - Add flexbox layout and gap spacing for better button presentation
Hey @justinmk , take a look at this , it's working now . |
Thanks! Feedback for future work: after all the words in this PR, I don't get the one explanation I actually need, which is how do the changes in The current PR description is a long list of things that happened, but no idea which ones solve which problem. |
{% unless page.url == "/404.html" %} | ||
<link rel="canonical" href="{{ site.url }}{% if page.canonical_url %}{{ page.canonical_url }}{% else %}{{ page.url }}{% endif %}" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIUC, the key change is that rel="canonical"
is skipped for the 404 page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, exactly right. That's the core fix - should have highlighted that upfront instead of all the implementation details
<link rel="canonical">
for 404 page
Thanks for the feedback! You're absolutely right - I should have clearly explained how the _layouts/default.html changes solve the specific problem. I'll make sure future PRs follow a Problem/Solution structure so the 'why' behind each change is clear upfront. |
Summary
Adds a custom 404 page for GitHub Pages with responsive design and mobile button alignment fixes.
Changes Made
404 Page (
404.html
)Layout Updates (
_layouts/default.html
)Features
Testing