Skip to content

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

Merged
merged 3 commits into from
Aug 29, 2017
Merged

Conversation

jerivas
Copy link
Contributor

@jerivas jerivas commented Aug 17, 2017

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.

@ericholscher
Copy link
Member

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 :)

@@ -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"
Copy link
Member

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.

Copy link
Member

@ericholscher ericholscher Aug 29, 2017

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 :)

@jerivas
Copy link
Contributor Author

jerivas commented Aug 29, 2017

Just committed the fix 😄

@ericholscher
Copy link
Member

Thanks! :)

@ericholscher ericholscher merged commit 9dca523 into readthedocs:master Aug 29, 2017
@wmayner
Copy link
Contributor

wmayner commented Sep 1, 2017

This removes support for the style parameter that Shields.io provides. Should we make that available?

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

Successfully merging this pull request may close these issues.

3 participants