Skip to content

Conversation

@jeanduplessis
Copy link
Collaborator

Fixes #1030 - Improves the 404 page by filtering hidden versions, organizing content logically, and adding helpful navigation hints.

Preview
20251208-201141@2x

Changes

  • Filter out hidden versions (v2.0-preview no longer appears)
  • Sort documentation versions by semver in descending order
  • Add clear section headers: "Documentation Versions" and "Other Resources"
  • Include master branch with note "(unreleased upcoming version)"
  • Add "Latest" badge to current version (v2.1)
  • Fix grammar: "looking at one of the following sections:"
  • Add note about archived versions available in GitHub repository tags

Additional refactoring:

  • Extract version sorting logic into shared utils/sorted-versions.html partial
  • Eliminates duplicated code between 404 page and version dropdown
  • Establishes single source of truth for version filtering and sorting

- Filter hidden versions (v2.0-preview no longer appears)
- Sort versions by semver in descending order (newest first)
- Add section headers to separate documentation versions from other resources
- Include master version with descriptive note
- Add "Latest" badge to current latest version
- Fix grammar: "looking at one of the following sections:"
- Add note about archived versions available in GitHub repository tags

Fixes #1030

Signed-off-by: Jean du Plessis <jean@upbound.io>
Extract duplicated semver sorting logic from 404.html and
version-dropdown-menu.html into a reusable utility partial at
utils/sorted-versions.html.

This eliminates 61 lines of duplicated code and establishes a
single source of truth for version filtering and sorting logic.

Benefits:
- Reduces code duplication across templates
- Improves maintainability (changes in one place)
- Follows established project pattern for utility partials
- Ensures consistency between 404 page and version dropdown

Signed-off-by: Jean du Plessis <jean@upbound.io>
@jeanduplessis jeanduplessis requested a review from jbw976 December 8, 2025 18:30
@netlify
Copy link

netlify bot commented Dec 8, 2025

Deploy Preview for crossplane ready!

Name Link
🔨 Latest commit 6676dda
🔍 Latest deploy log https://app.netlify.com/projects/crossplane/deploys/69371acfa6be9b0008c92720
😎 Deploy Preview https://deploy-preview-1031--crossplane.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 93 (no change from production)
Accessibility: 90 (🔴 down 2 from production)
Best Practices: 92 (no change from production)
SEO: 100 (no change from production)
PWA: 70 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

Update version sorting to display master at the top of the list,
before stable releases. This makes the unreleased upcoming version
more prominent for users who want bleeding-edge documentation.

Signed-off-by: Jean du Plessis <jean@upbound.io>
Copy link
Member

@jbw976 jbw976 left a comment

Choose a reason for hiding this comment

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

awesome @jeanduplessis, this is definitely an improvement over the current 404 page! thanks for making this happen! 🎉

@jbw976 jbw976 merged commit e56d458 into master Dec 8, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

can the 404 page content be improved?

3 participants