-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
x/pkgsite: serve status badge similar to godoc.org #36982
Comments
I just handcrafted a badge on https://shields.io:
Feel free to tweak the parameters to improve it :-) The resulting svg could be statically saved somewhere on https://pkg.go.dev (since it is not package dependent). Edit: use |
For the badge, I've used golang/go#36982 (comment)
I was able to get a nice badge for flaggy with the following code in my README.md (inspired from @oliverpool above):
|
Can't migrate badge images until golang/go#36982.
Thanks for the suggestions! Our UX team is working on creating a badge for pkg.go.dev documentation reference. /cc @fflewddur |
... but keep the current badge, until pkg.go.dev has an official one. Reference: golang/go#36982
Didn't update yet: golang/go#36982
There are tons of Is there a reason not to approve the one @oliverpool provided and make it official so everyone can start the migration? I'm tempted to use it, but if there will be a new recommended badge after several months it will be quite painful to update all Is there a confirmation that an official badge will be provided? I don't want to sound skeptical, but it seems like the priority for this is very low and it can be delayed for ~infinity. :) Subjectively, it's better to have a "no, unlikely" answer than "yes, there will be" without any guarantees. |
An official badge will be provided - our goal is to have one available in the next month. |
README godoc badge stays bound to godoc.org until golang/go#36982 is resolved. Signed-off-by: Maxime Soulé <btik-git@scoubidou.com>
@julieqiu github.com/google/go-cmp is using this shields.io badge which would be a great default badge: |
The former is the new recommended frontend for browsing Go API documentation online. Note that pkg.go.dev doesn't offer status badges at this point in time[1], so until that feature is introduced we're going to use a custom badge made using shields.io. [1] golang/go#36982 Signed-off-by: Andrea Bolognani <abologna@redhat.com>
The former is the new recommended frontend for browsing Go API documentation online. Note that pkg.go.dev doesn't offer status badges at this point in time[1], so until that feature is introduced we're going to use a custom badge made using shields.io. [1] golang/go#36982 Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Change https://golang.org/cl/241273 mentions this issue: |
You can see the rendered version here: https://www.svgviewer.dev/s/SYc1TNlk |
Add a badge for GoThemis as well, leading to our pkg.go.dev page. Unfortunately, this badge needs to be manually updated with each release. Though, there is an issue tracking badge generation [1]. There has been some recent progress on it, but who knows when it lands into production. [1]: golang/go#36982
Add a badge for GoThemis as well, leading to our pkg.go.dev page. Unfortunately, this badge needs to be manually updated with each release. Though, there is an issue tracking badge generation [1]. There has been some recent progress on it, but who knows when it lands into production. [1]: golang/go#36982
You can now generate a badge here: https://pkg.go.dev/badge. I'll update go.dev/about with instructions. |
🤦 There is a typo in the markdown snippet #40216. I'll post here again once we deploy the fix. |
Thanks, Go team! 👏 You can generate the badge line yourself by following this template: [![PkgGoDev](https://pkg.go.dev/badge/<MODULE NAME>)](https://pkg.go.dev/<MODULE NAME>) For example, the badge for my [![PkgGoDev](https://pkg.go.dev/badge/github.com/ryboe/q)](https://pkg.go.dev/github.com/ryboe/q) |
The fix for #40216 is out! |
Thank you for your work! The description of the form of the badge generator is a bit misleading. The field is called For example I used the URL
But correct is
|
Hi, ostcar! 👋 Since this issue is closed please file a new issue here where people can discuss. I have a few thoughts on this as well and the work done here is just a starting point to guide building out this feature. Thank you! |
What did you do?
It would be nice to have a badge that can be used on other sites (e.g. github.com) that link to the documentation page of the module / package.
For example, using a URL like this:
https://godoc.org/github.com/icza/bitio?status.svg
Serves an image, a badge which is often used on the package's repository to link to the documentation, like this one:
A similar feature like
https://pkg.go.dev/github.com/icza/bitio?status.svg
Would be useful. Some configuration via URL parameters (like size, color etc) would also be cool.
What did you expect to see?
To have a badge image served similar to godoc.org's response.
What did you see instead?
Request is redirected to https://pkg.go.dev/github.com/icza/bitio?tab=doc and the HTML page is served.
The text was updated successfully, but these errors were encountered: