-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Switch to static SVG badges #3057
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
Conversation
Thanks for this @jerivas! If you want to fix the linting issue, I'll get it merged & deployed. I'll give ya a couple days, and then fix it myself if I don't hear from ya :) |
readthedocs/projects/views/public.py
Outdated
@@ -105,36 +106,23 @@ def get_context_data(self, **kwargs): | |||
@never_cache | |||
def project_badge(request, project_slug): | |||
"""Return a sweet badge for the project""" | |||
BADGE_PATH = "projects/badges/%s.svg" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
linting says this should be lower case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also believe this probably needs to have a MEDIA_URL prepended to it, for production.
Nevermind, I missed the static
call :)
Just committed the fix 😄 |
Thanks! :) |
This removes support for the |
This completely removes the shields.io dependency and simply serves badges as static SVGs. The badges no longer display the version slug, they just show the "unknown", "passing", and "failing" status, with the appropriate color.
Docs have also been updated.