-
Notifications
You must be signed in to change notification settings - Fork 473
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
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 |
.ci/generate_redirects.jl
Outdated
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>, \ |
.ci/generate_redirects.jl
Outdated
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>, \ |
.ci/generate_redirects.jl
Outdated
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]>
So all that needs to done is change the |
I think it might also be nice to change "no package Example" to "no package Example.jl" in the user-facing message. Because the user will likely want to do a web search for the package, and doing a web search for "Example.jl" will likely be more useful than doing a web search for "Example". |
Are the jlls also called .jl? By the way, the search links already include the jl |
Yeah, JLLs are named e.g. |
@ericphanson @giordano Any other thoughts here? |
Adds a special error mode if the path matches the required format but the package is wrong:
And a generic 404 page otherwise