Comments (2)
I like the idea.
we probably would just have to define a new error type & page with the necessary information.
Also note another option:
when you switch platforms in a release and the other platform doesn't have the current file, we convert the URL into a search and run a rustdoc search on the other platform. Not sure if this would be a useful other option for this 404 page.
from docs.rs.
@kpreid Here is a suggestion.
How to Solve the Issue
-
Design a New 404 Error Page:
- Information Display: The 404 page should clearly state that the requested resource does not exist but that the package and version are valid.
- Navigation Options: Provide direct links to:
- The root documentation page for the current version.
- A page to browse other versions of the package.
- Previous Version Lookup (Stretch Goal):
- Implement a feature to search for the most recent previous version where the resource was available and link to that version.
-
Implementing Navigation Links:
- Root Documentation Link: This can be achieved by extracting the base URL from the request and appending the version to navigate to the root documentation for that version.
- Version Browsing Link: Provide a link to the package’s main page where users can select different versions to view.
- Previous Version Lookup:
- Implement logic to search through the version history of the package to find the last version where the resource existed. This might involve querying metadata or change logs.
Example 404 Page Design
Here’s a conceptual design for the improved 404 error page:
404 Not Found
The requested resource does not exist in the current version of the package.
Package and Version Information:
- Package:
example
- Version:
0.18.0
Navigation Options:
(Optional) Previous Version with Resource:
- The requested resource was available in version 0.17.0. [View documentation for this version]
from docs.rs.
Related Issues (20)
- Crate failed to build HOT 3
- increase RAM or lower number of jobs for crates diffsl and diffsol HOT 2
- Does not build for MacOS and Windows target. HOT 1
- Add lines labels to `/crate/**/source/` HOT 8
- several Bevy crates failed to build with yanked dependencies error but could not find which HOT 8
- Build fails due to DNS resolution problem HOT 1
- SM-G355HN
- LIEF Rust bindings need network access HOT 2
- Rebuild request: SQLx 0.8.0 crates HOT 3
- Crate Build Failure for `holochain_scaffolding_cli` HOT 2
- Doc build fails on nightly preventing stable doc to be released HOT 2
- `system-memory` crate builds on docs.rs but seems to be missing serveral of the targets specified in the metadata table. HOT 3
- Feature request: inject syntax highlighting for TOML into crate docs HOT 5
- Crate succeeds to build, but some modules are unreachable HOT 4
- HTML misformatting on crate page HOT 1
- Adding `rustdoc-args = ["--generate-link-to-definition"]` in `[package.metadata.docs.rs]` makes documentation coverage dissapear HOT 10
- cea708-types 0.3.4 failed to build HOT 2
- Please upgrade CMake to 3.28 HOT 6
- RUSTSEC-2024-0363: Binary Protocol Misinterpretation caused by Truncating or Overflowing Casts
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docs.rs.