-
Notifications
You must be signed in to change notification settings - Fork 10.9k
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
Add redirect from api/latest to the Javadoc of the latest release. #7613
base: gh-pages
Are you sure you want to change the base?
Conversation
b11b94f
to
4684c70
Compare
This is very cool, but I am worried that there will be undesirable effects from using a 404 for this. Not that our current implementation is particularly principled: Still, I could imagine that this would upset a broken-link detector, prevent indexing of the pages that we redirect to, and maybe interfere with other thing that I wouldn't have foreseen just because it's a somewhat unusual use case. If this is something that you want to see through, are there other ways to accomplish the main goals? I'm not sure there's any reason that we need to use To the extent that the goal is to have the redirectors point to a "latest release" page instead of a "latest snapshot" page, I am still iffy on that as a goal, but I wouldn't stand in the way if it feels worthwhile to you. If |
Yeah, I think the redirect pages are tagged
We could also just write our own generator plugin: https://jekyllrb.com/docs/plugins/generators/
It's not necessary, but I wanted to reuse the theme of the website and that involves reusing the layout. Writing our own html would require duplicating most of the layout boilerplate. |
I do hope that it works correctly now, though I'm not even sure how I'd go about confirming that. My expectation is that it would stop working if the page started returning a 404—and maybe even if it continued to return a 200 but used only JavaScript for the redirect. Google's docs suggest that JavaScript redirects should work, but I don't know how sophisticated the detection is, and of course Google is not the only search engine :)
That might be cleanest. I'm still comfortable with how things are now (at least now that the Javadoc link on the landing page is more prominent), but that does sound promising if we want a change.
Ah, sorry, I was talking about our existing zillions of |
Okay, I've removed the 404 redirect stuff. Now it's just an automatic redirect to the latest API using the existing method. I can't just set |
Also: - Added badges for the latest and snapshot versions of Javadocs. - Fixed the whitespaces in the generated HTML files. - Fixed the config so that the website works on local development servers. - Removed some unused files. - Added a basic 404 page.
Also: