-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Serve Badges from Read the Docs #2065
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
Comments
Yea, agreed. Just need to figure out a good way to generate the SVG's. |
Looks like this page has some basic SVG for it: http://www.desmondrivet.com/blog/technical/pylint-badges |
Worked on a basic proof of concept here: #2071 -- needs more work, but will be a starting point. Would be great if anyone with SVG knowledge can clean it up. |
Is Shields.io really unreliable? My understanding is that it's used by many other services under the hood to serve standardized SVG. They also support passing a |
From what I understand one of the things that was struggled with was getting the rectangle and the width of the text to scale together without having to first render and then get the text size. I tried to do an experiment to see if I could work around that by using filters. The experiment managed to get the box to scale to fit the svg text within it, without needing to measure. However, the amount of border space was percentile. So as the length of the text increased the space between the border and the text increased, which doesn't seem like what we want. I was asked to post the experiment here so the knowledge wasn't lost. Another problem was that I'm not quite sure how to get the rounded corners with this approach.
Edit: Managed to use |
I think this issue is no more relevant since RTD is already serving badged under its own domain and the badges are the same for all the project: I'm closing this issue. Please, feel free to reopen if you consider that something is missing or more work is needed here. Docs on this, at http://docs.readthedocs.io/en/latest/badges.html |
My understanding of how badges work in Read the Docs is to serve those badges from shields.io. Given the unreliable nature of
shields.io
, perhaps it would be better to integrateshields.io
into RTD, and serve generated badges from RTD instead of just doing a 302 redirect toshields.io
.The text was updated successfully, but these errors were encountered: