-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Will GitHub support our Retina badge endeavours? #103
Comments
Hey! Cool looking project. I just found out about this right now. :)
I'm afraid this is not an option. In general embedding SVGs in READMEs is discouraged (they can get quite heavy), and embedding fonts inside of SVGs doubly so, as the images simply balloon in size. Serving the custom font ourselves doesn't solve anything and forces users to get even slower page load times.
The right way to go about these extensions is to simply tell users to use the raw HTML feature of Markdown that allows them to embed whatever HTML they want in their READMEs.
The sanitization code we use for https://github.com/jch/html-pipeline/blob/master/lib/html/pipeline/sanitization_filter.rb
No, we're still using the same private fork (which happens to be the vanilla code of vmg/Sundown with a custom API wrapper).
As you probably know, we proxy all non-https images with a daemon called Much love! |
That's 404. I guess https://github.com/atmos/camo? |
@vmg It's possible that there are enough badges on GitHub READMEs that preloading Open Sans would decrease page load times overall, because once the font is loaded it would stay in browser cache for a long time, and SVG badges without the font embedded are smaller than SVG with the font embedded (of course), but also than PNG.
If Shields goes with PNGs, we have to at least triple-size them to account for Retina, so un-font-embedded SVG is going to be even more of a win from a size standpoint. |
@vmg Can you help me figure out how to modify GitHub so that it shows SVG files from the repo as images, just like it does with PNG files? Which repo handles that? For instance, See for instance https://github.com/espadrine/ass/blob/601a7027d1874010a8b333ac98ae2084f10e0e74/example/README.md (with SVG) and https://github.com/espadrine/ass/blob/601a7027d1874010a8b333ac98ae2084f10e0e74/README.md (with PNG). In this case, I am trying to have a small SVG badge stored alongside the project, in the repo. |
The answer here seems to be, "no." |
The people #96 behind badge generation tools & services are here. We're ready to take badges to the next level: starting with Retina.
The main target for badges are the humble README files on GitHub. As we face new challenges, it would be very helpful to have the support of GitHub. @mojombo _Is there a GitHubber interested in seeing this project succeed?_
Here are some of the challenges and how GitHub could help.
SVG & Open Sans
SVG, as referenced by an
<img>
tag is the best option to support Retina & 4K displays now and into the future. Ideally we would like to continue using Open Sans, which remains legible at small sizes across platforms. #97 But there are some problems:It would be much more efficient if GitHub, Travis CI @rkh, and other sites displaying SVG badges provided Open Sans on pages containing a badge. Something like this:
Pixel Doubled PNGs & Markdown
While we consider SVG a better solution for Retina displays #102, if we did want to support Retina-ready PNGs, we would need additional attributes on
<img>
tags. #34<img>
tags in Markdown, will these attributes be maintained when escaped? (not the case forsrcset
on GitHub).If we were to pursue this path, how would we get the changes into GitHub's Markdown engine?
A year ago @vmg indicated that GitHub is using a private fork of Sundown. vmg/redcarpet#178 Has this changed? (say to the open source https://github.com/hoedown/hoedown descendent).
As we progress, there may be other situations where having a GitHubber involved on the Shields.io team would be very beneficial. Thanks for your attention.
P.S. Though not entirely related, it's sad that we haven't yet heard from GitHub Support regarding this issue. badges/buckler#27 😦
P.P.S. Financial support on https://www.gittip.com/Shields.io/
The text was updated successfully, but these errors were encountered: