Re:Show HN: Supershields.io – smart, Lua-powered SVG status ...
by captn3m0 on Thursday February 24, 2022 @03:25AM
(#30452211)
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.
[ Parent
| on HN ]
Re:Show HN: Supershields.io – smart, Lua-powered SVG status ...
by rlonn on Thursday February 24, 2022 @03:35AM
(#30452306)
You 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.
Re:Show HN: Supershields.io – smart, Lua-powered SVG status ...
by toomanydoubts on Thursday February 24, 2022 @04:51AM
(#30452873)
Is it really a silly policy? I like that a lot.
Re:Show HN: Supershields.io – smart, Lua-powered SVG status ...
by rlonn on Thursday February 24, 2022 @05:11AM
(#30453018)
Of 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!
Re:Show HN: Supershields.io – smart, Lua-powered SVG status ...
by arraypad on Thursday February 24, 2022 @05:09AM
(#30452992)
Github 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.
Re:Show HN: Supershields.io – smart, Lua-powered SVG status ...
by styfle on Thursday February 24, 2022 @08:22AM
(#30454313)
Yep
Here’s an example of SVG animation https://github.com/sindresorhus/css-in-readme-like-wat
Also see https://badgen.net which is another alternative to the original post.