Skip to content

docs: customize the 404 not found page#333

Draft
Snoopy1866 wants to merge 1 commit into
mainfrom
docs-404
Draft

docs: customize the 404 not found page#333
Snoopy1866 wants to merge 1 commit into
mainfrom
docs-404

Conversation

@Snoopy1866

Copy link
Copy Markdown
Owner

No description provided.

@Snoopy1866 Snoopy1866 changed the title docs: customize 404 not found page docs: customize the 404 not found page May 11, 2026
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label May 11, 2026
@codecov

codecov Bot commented May 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (d07db52) to head (e1170b7).

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #333   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           16        16           
  Lines          580       580           
=========================================
  Hits           580       580           
Flag Coverage Δ
test-core-macos-latest-py3.10 100.00% <ø> (ø)
test-core-macos-latest-py3.11 100.00% <ø> (ø)
test-core-macos-latest-py3.12 100.00% <ø> (ø)
test-core-macos-latest-py3.13 100.00% <ø> (ø)
test-core-macos-latest-py3.14 100.00% <ø> (ø)
test-core-ubuntu-latest-py3.10 100.00% <ø> (ø)
test-core-ubuntu-latest-py3.11 100.00% <ø> (ø)
test-core-ubuntu-latest-py3.12 100.00% <ø> (ø)
test-core-ubuntu-latest-py3.13 100.00% <ø> (ø)
test-core-ubuntu-latest-py3.14 100.00% <ø> (ø)
test-core-windows-latest-py3.10 100.00% <ø> (ø)
test-core-windows-latest-py3.11 100.00% <ø> (ø)
test-core-windows-latest-py3.12 100.00% <ø> (ø)
test-core-windows-latest-py3.13 100.00% <ø> (ø)
test-core-windows-latest-py3.14 100.00% <ø> (ø)
test-minimum-scipy-ubuntu-latest-py3.10-scipy1.7.2 100.00% <ø> (ø)
test-minimum-scipy-ubuntu-latest-py3.11-scipy1.10.1 100.00% <ø> (ø)
test-minimum-scipy-ubuntu-latest-py3.12-scipy1.11.3 100.00% <ø> (ø)
test-minimum-scipy-ubuntu-latest-py3.13-scipy1.15.0 100.00% <ø> (ø)
test-minimum-scipy-ubuntu-latest-py3.14-scipy1.16.1 100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread docs/overrides/404.html
Comment thread docs/overrides/404.html
</div>

<a
href="{{ config.site_url | default(base_url ~ '/../') }}"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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 }}"

Comment thread docs/overrides/404.html
Comment on lines +64 to +71
[data-md-component="content"] {
margin-left: 0 !important;
width: 100% !important;
}
.md-sidebar--primary,
.md-sidebar--secondary {
display: none !important;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.

@Snoopy1866 Snoopy1866 marked this pull request as draft May 11, 2026 03:49

@codacy-production codacy-production Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

AI Reviewer: first review requested successfully. AI can make mistakes. Always validate suggestions.

Run reviewer

TIP This summary will be updated as you push new changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant