Skip to content
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 https://cljdoc.xyz/d/<groupid>/<artifactid> to the latest version? #163

Closed
danielcompton opened this issue Oct 18, 2018 · 4 comments

Comments

@danielcompton
Copy link
Contributor

When I was just typing URLs, I expected that
https://cljdoc.xyz/d/reagent/reagent would take me to
https://cljdoc.xyz/d/reagent/reagent/0.8.1, however instead the version selection page is at the root of the project. I wondered whether it would be more aesthetically pleasing to redirect to the latest version of the library and create a new /versions route for version selection?

@martinklepsch
Copy link
Member

are you suggesting

  1. https://cljdoc.xyz/d/reagent/reagent/versions or
  2. https://cljdoc.xyz/versions/reagent/reagent

I wanted to avoid the "route overloading" of option 1 since IIRC versions can be arbitrary strings. But we could establish that /d/ should always try to get you to some docs as best as possible.
It could e.g. also redirect https://cljdoc.xyz/d/reagent assuming identical group and artifact name.

@danielcompton
Copy link
Contributor Author

Yeah I did think about the route overloading problem. I was suggesting 1, but looking at it now, probably 2 is better.

It could e.g. also redirect https://cljdoc.xyz/d/reagent assuming identical group and artifact name.

Clojars does this and while it works, it does lead to some slightly confusing scenarios as there is a bit of route overloading between groups and usernames IIRC. I'd probably steer away from it personally, but don't feel strongly about it.

@martinklepsch
Copy link
Member

Clojars does this and while it works, it does lead to some slightly confusing scenarios as there is a bit of route overloading between groups and usernames IIRC.

Since we still have the /d/ scoping we should be fine, maybe?

@danielcompton
Copy link
Contributor Author

Yeah it would be fine, it's just that you might end up wanting to do something with the single level as well later. But given the /d it's probably unlikely to be a problem.

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

No branches or pull requests

2 participants