-
Notifications
You must be signed in to change notification settings - Fork 475
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
Redirect pages: Add 404 pages #121137
base: master
Are you sure you want to change the base?
Redirect pages: Add 404 pages #121137
Conversation
I don't think all those links to search engines are necessary. I think the "no package exists" message is fine, and then maybe just a link to the JuliaLang.org homepage. |
And for the generic 404 page, maybe a link to the JuliaLang.org homepage would be nice. |
I just implemented what @MasonProtter suggested as two other people also liked that, I have no strong preference regarding the exact content of the 404 pages |
Personally I think it's cleaner without the search engine links. Either way, if we do have the search engine links, we should probably |
messageElement.innerHTML = `\ | ||
There is no package \${packageName} registered in the Julia General Registry.\ | ||
<br><br>\ | ||
Would you like to try searching <a href="https://github.com/search?q=\${packageName}.jl&type=repositories">Github</a>, \ |
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.
Would you like to try searching <a href="https://github.com/search?q=\${packageName}.jl&type=repositories">Github</a>, \ | |
Would you like to try searching <a href="https://github.com/search?q=\${packageName}.jl&type=repositories">GitHub</a>, \ |
There is no package \${packageName} registered in the Julia General Registry.\ | ||
<br><br>\ | ||
Would you like to try searching <a href="https://github.com/search?q=\${packageName}.jl&type=repositories">Github</a>, \ | ||
<a href="https://about.gitlab.com/search/?searchText=\${packageName}.jl">Gitlab</a>, \ |
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.
<a href="https://about.gitlab.com/search/?searchText=\${packageName}.jl">Gitlab</a>, \ | |
<a href="https://about.gitlab.com/search/?searchText=\${packageName}.jl">GitLab</a>, \ |
const messageElement = document.querySelector(".centered-div p"); | ||
// Update the paragraph text | ||
messageElement.innerHTML = `\ | ||
There is no package \${packageName} registered in the Julia General Registry.\ |
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.
Would it be better to say Example.jl
instead of just Example
?
There is no package \${packageName} registered in the Julia General Registry.\ | |
There is no package \${packageName}.jl registered in the Julia General Registry.\ |
I thought about it a bit more. I think I'm fine with keeping the search engine links for now. We can re-evaluate and remove later if we change our minds. |
What does the user experience look like if they have JavaScript disabled or blocked? |
This PR reminded me that probably
.github/workflows/redirects_page.yml and .ci/generate_redirects.jl
|
Personally, I think the search engine links are very helpful, because not all julia packages are registered, and this gives some helpful breadcrumbs for users to find non-registered packages if they're linked to them by the autolinkifier in Discourse and Zulip. |
Co-authored-by: Dilum Aluthge <[email protected]>
Adds a special error mode if the path matches the required format but the package is wrong:
And a generic 404 page otherwise