docs: customize the 404 not found page#333
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #333 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 16 16
Lines 580 580
=========================================
Hits 580 580 Flags with carried forward coverage won't be shown. Click here to find out more. |
There was a problem hiding this comment.
Code Review
This pull request introduces a custom 404 error page with a statistical theme and updates the configuration to enable template overrides. The review feedback suggests using theme-specific CSS variables for font consistency, utilizing the MkDocs url filter for better environment compatibility in links, and avoiding the use of !important in CSS to ensure better maintainability.
| </div> | ||
|
|
||
| <a | ||
| href="{{ config.site_url | default(base_url ~ '/../') }}" |
There was a problem hiding this comment.
Using config.site_url for the home link can lead to issues in local development or staging environments, as it typically points to the production URL. It is recommended to use the MkDocs url filter, which correctly handles relative paths across different deployment environments and ensures the link works correctly during local preview (mkdocs serve).
href="{{ 'index.html' | url }}"
| [data-md-component="content"] { | ||
| margin-left: 0 !important; | ||
| width: 100% !important; | ||
| } | ||
| .md-sidebar--primary, | ||
| .md-sidebar--secondary { | ||
| display: none !important; | ||
| } |
There was a problem hiding this comment.
The use of !important to override layout styles (like margin-left and width) is generally discouraged as it makes the CSS harder to maintain and can cause issues with future theme updates. Since the sidebars are already emptied via Jinja2 blocks (left_sidebar and right_sidebar), the layout should naturally adjust. Consider using more specific selectors or checking if the theme's default layout can achieve the same centering without forced overrides.
There was a problem hiding this comment.
Pull Request Overview
The PR titled "docs: customize the 404 not found page" currently provides no implementation details. Both the PR description and the code diff are empty, meaning the custom 404 page requirement has not been met. This is a critical blocker as there is nothing to review or merge.
About this PR
- The provided code diff is empty; no implementation of the 404 page customization was submitted.
- The PR description is completely empty, providing no context for the intended changes.
Test suggestions
- Verify that navigating to a non-existent URL renders the custom 404 page.
Prompt proposal for missing tests
Consider implementing these tests if applicable:
1. Verify that navigating to a non-existent URL renders the custom 404 page.
TIP Improve review quality by adding custom instructions
TIP How was this review? Give us feedback
Up to standards ✅🟢 Issues
|
No description provided.