4 ms·
Does GitHub let you embed and keep these as smart? (SVG auto-updates for eg?) My understanding was that Github proxies all SVGs and renders them as PNG/JPG at t
by captn3m0 5y ago
Does GitHub let you embed and keep these as smart? (SVG auto-updates for eg?) My understanding was that Github proxies all SVGs and renders them as PNG/JPG at their end.
- rlonn 5y agoYou can put external links into e.g. your Github README.md to display badges but yes, Github seem to have some silly policy of not allowing people to inject executable Javascript into their website so you can't embed things using <object> tags, or similar. You have to use <img> which means no JS included in the badge SVG will be executed => no automatic updates.
- toomanydoubts 5y agoIs it really a silly policy? I like that a lot.
- rlonn 5y agoOf course it is silly - it infringes on my personal freedom not to be able to execute arbitrary code on the computers of people visiting Github!
- arraypad 5y agoGithub does proxy SVGs, but it doesn't rasterize them. If you're interested in embedding something like this on GitHub then you might want to check out Repography [1]. There are only a few styles of dashboards at the moment but I'm working on others. [1] https://repography.com/ https://repography.com/
- styfle 5y agoYep Here’s an example of SVG animation https://github.com/sindresorhus/css-in-readme-like-wat https://github.com/sindresorhus/css-in-readme-like-wat Also see https://badgen.net https://badgen.net which is another alternative to the original post.