dzikoysk / reposilite

Lightweight and easy-to-use repository management software dedicated for the Maven-based artifacts in the JVM ecosystem 📦
https://reposilite.com
Apache License 2.0
1.38k stars 183 forks source link

List of available javadocs #1904

Open kazuryyx opened 1 year ago

kazuryyx commented 1 year ago

Request details

So, what if it was possible to add a javadocs viewer for example:

Lets say, having a repo up named like "SomeAPI" and you go to the page: "domain/javadoc/snapshots/me/somename/SomeAPI" It would give you a link that always points to the latest javadoc view where you can select all of the versions that are currently in "SomeAPI" and make you select one of the snapshot versions -> it opens the page on "domain/javadoc/snapshots/me/somename/SomeAPI/selectedVersion-SNAPSHOT" where people can then see the docs for this specific version, and not having to specify the version in a link.

mfnalex commented 1 year ago

I'd also like to see a "permanent" link that always shows the latest available javadocs - e.g. urltorepo/groupid/artifactid/javadoc-latest

dzikoysk commented 1 year ago

I think it was already request on our Discord server a while ago, so it's good to have an issue for that. Unfortunately, I'm slightly busy right now.

Because javadocs viewer is a part of backend, not frontend, we'd need to generate such list server side with raw html, just like this one:

https://github.com/dzikoysk/reposilite/blob/62deca6d9a859a1991d81074b553109255f5fdd2/reposilite-backend/src/main/kotlin/com/reposilite/javadocs/JavadocView.kt#L31-L37

TechnicJelle commented 3 months ago

I was just looking for something like this, too. And while I haven't found a way to see all the available javadocs in a nice list or dropdown, I did find out that there is a permanent link to the latest javadoc version, by putting "latest" instead of the version number in the URL. Example: https://maven.reposilite.com/javadoc/releases/com/reposilite/reposilite/3.2.0 ↓ https://maven.reposilite.com/javadoc/releases/com/reposilite/reposilite/latest

Though, it might be nice if this was an actual redirect, instead of a different URL that has the same content on it. Like how GitHub Releases does it: if click on this URL: https://github.com/dzikoysk/reposilite/releases/latest it redirects to https://github.com/dzikoysk/reposilite/releases/tag/3.5.14