<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Shay Manor</title>
    <description>The latest articles on DEV Community by Shay Manor (@shay_manor_428011eaece64a).</description>
    <link>https://dev.to/shay_manor_428011eaece64a</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2451197%2F0345ac3c-9f7d-4a4d-8149-793b1dd6accf.jpg</url>
      <title>DEV Community: Shay Manor</title>
      <link>https://dev.to/shay_manor_428011eaece64a</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/shay_manor_428011eaece64a"/>
    <language>en</language>
    <item>
      <title>SVG animations in a GitHub README freeze on their first frame</title>
      <dc:creator>Shay Manor</dc:creator>
      <pubDate>Sun, 29 Nov 2026 18:22:46 +0000</pubDate>
      <link>https://dev.to/shay_manor_428011eaece64a/svg-animations-in-a-github-readme-freeze-on-their-first-frame-2ao2</link>
      <guid>https://dev.to/shay_manor_428011eaece64a/svg-animations-in-a-github-readme-freeze-on-their-first-frame-2ao2</guid>
      <description>&lt;p&gt;I build &lt;a href="https://gh-stats.com" rel="noopener noreferrer"&gt;gh-stats&lt;/a&gt;, a single SVG card for a GitHub profile README: a score out of 100, a contribution timeline, top collaborators, languages and commit streaks. One line of markdown, no signup.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://gh-stats.com" rel="noopener noreferrer"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ff7z85ps49ey695dtdjqi.png" alt="gh-stats score card for torvalds" width="800" height="461"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For a while the score ring on that card was invisible on every profile that embedded it, and every test I had said it was fine. Here is why.&lt;/p&gt;

&lt;h2&gt;
  
  
  The bug
&lt;/h2&gt;

&lt;p&gt;The ring animated in with SMIL:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;circle&lt;/span&gt; &lt;span class="na"&gt;stroke-dasharray&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"226.19"&lt;/span&gt; &lt;span class="na"&gt;stroke-dashoffset&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"26.23"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;animate&lt;/span&gt; &lt;span class="na"&gt;attributeName&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"stroke-dashoffset"&lt;/span&gt;
           &lt;span class="na"&gt;from&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"226.19"&lt;/span&gt; &lt;span class="na"&gt;to&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"26.23"&lt;/span&gt; &lt;span class="na"&gt;dur&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"1s"&lt;/span&gt; &lt;span class="na"&gt;fill&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"freeze"&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/circle&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;GitHub renders README images through &lt;code&gt;&amp;lt;img&amp;gt;&lt;/code&gt;, which puts the SVG in secure static mode. Animations don't run there. What gets painted is the animation's start value, not the element's static attribute. &lt;code&gt;from="226.19"&lt;/code&gt; equals the full dash length, so the ring sat entirely out of view. Progress bars that animated from &lt;code&gt;width="0"&lt;/code&gt; were flattened the same way.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why tests missed it
&lt;/h2&gt;

&lt;p&gt;cairosvg, resvg and similar rasterizers ignore &lt;code&gt;&amp;lt;animate&amp;gt;&lt;/code&gt; and paint the static attribute. So the card looked perfect in every local render and every generated screenshot. The only faithful reproduction is a real &lt;code&gt;&amp;lt;img&amp;gt;&lt;/code&gt; tag in a real browser, served over http.&lt;/p&gt;

&lt;p&gt;I now have a test that fails if any animated element starts from a visually empty value.&lt;/p&gt;

&lt;h2&gt;
  
  
  CSS keyframes don't save you
&lt;/h2&gt;

&lt;p&gt;I tried moving the reveal to CSS keyframes, expecting the base value to survive. Chrome freezes CSS animations at the first keyframe inside &lt;code&gt;&amp;lt;img&amp;gt;&lt;/code&gt; too. So for a README image you choose: a reveal animation, or a correct static render. The fix was to delete the reveal.&lt;/p&gt;

&lt;p&gt;One animation did survive: the language donut. Its start state offsets the dash by exactly one full period, which looks identical to the end state, so the frozen frame is correct.&lt;/p&gt;

&lt;h2&gt;
  
  
  The rule
&lt;/h2&gt;

&lt;p&gt;If an SVG will ever be shown through &lt;code&gt;&amp;lt;img&amp;gt;&lt;/code&gt; (GitHub READMEs, most markdown renderers, email), make every animation's first frame a valid final picture.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;[![my stats](https://gh-stats.com/api/YOUR_USERNAME)](https://gh-stats.com)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Five themes, dark/light auto-switching, and it is MIT and self-hostable: &lt;a href="https://github.com/ShayManor/github-readme-stats" rel="noopener noreferrer"&gt;github.com/ShayManor/github-readme-stats&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If you have found a way to keep a reveal animation and still render correctly inside &lt;code&gt;&amp;lt;img&amp;gt;&lt;/code&gt;, I would like to hear it.&lt;/p&gt;

</description>
      <category>github</category>
      <category>svg</category>
      <category>webdev</category>
      <category>showdev</category>
    </item>
    <item>
      <title>I got tired of my GitHub profile card 429ing, so I built an alternative</title>
      <dc:creator>Shay Manor</dc:creator>
      <pubDate>Tue, 21 Apr 2026 18:24:32 +0000</pubDate>
      <link>https://dev.to/shay_manor_428011eaece64a/i-got-tired-of-my-github-profile-card-429ing-so-i-built-an-alternative-2jge</link>
      <guid>https://dev.to/shay_manor_428011eaece64a/i-got-tired-of-my-github-profile-card-429ing-so-i-built-an-alternative-2jge</guid>
      <description>&lt;p&gt;If you've used &lt;code&gt;github-readme-stats&lt;/code&gt; on your profile (the Anurag Hazra one with 70k+ stars) you've probably seen this at least once:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhkhlkn74yrlbl3m7ww17.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhkhlkn74yrlbl3m7ww17.png" alt=" " width="512" height="150"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Mine broke last month. Then it broke again a week later. I looked into it and found the maintainers themselves recommend self-hosting now, because the public Vercel instance gets rate-limited under traffic. Fair enough — they're a small team serving millions of requests a day for free. But "just self-host it" means spinning up Vercel, generating a PAT, configuring env vars, and maintaining it. For a readme card.&lt;/p&gt;

&lt;p&gt;So I built &lt;a href="https://gh-stats.com" rel="noopener noreferrer"&gt;gh-stats.com&lt;/a&gt;. Same idea, different backend, no setup.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I actually changed
&lt;/h2&gt;

&lt;p&gt;Three things, in order of how much they mattered:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Caching that isn't fighting GitHub's rate limits.&lt;/strong&gt; The original caches responses, but it's still making live API calls per request under load. I'm caching aggressively on the edge and only re-fetching when the data is actually stale. For 99% of profile views, you're hitting a cache, not GitHub.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. No PAT required.&lt;/strong&gt; You paste your username, copy the markdown, done. The original works the same way for the public instance, but the moment you self-host (which they recommend), you're managing a token.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. It just works on first load.&lt;/strong&gt; No "generating..." spinner, no empty card while the API warms up.&lt;/p&gt;

&lt;p&gt;Here's what the usage looks like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="p"&gt;![&lt;/span&gt;&lt;span class="nv"&gt;stats&lt;/span&gt;&lt;span class="p"&gt;](&lt;/span&gt;&lt;span class="sx"&gt;https://gh-stats.com/api/yourusername&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's it. Same API shape as the original, so if you're already using it, you can swap the domain and keep your existing params.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I'm not claiming
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;It's not more &lt;em&gt;featureful&lt;/em&gt; than the original. Anurag's project has years of theme contributions, Wakatime cards, gist cards, etc. I have stats cards, top-languages cards, and streaks. That's the scope right now.&lt;/li&gt;
&lt;li&gt;It's not more &lt;em&gt;trusted&lt;/em&gt; than the original. It's new. You should assume it might break. File an issue if it does and I'll fix it fast — right now "fast" means same day, because there are ~10 of us using it.&lt;/li&gt;
&lt;li&gt;I'm not trying to replace &lt;code&gt;github-readme-stats&lt;/code&gt;. I'm trying to be the thing you swap to when it's down.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What I want from you
&lt;/h2&gt;

&lt;p&gt;Two things:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;If you're hitting the 429 problem on your profile, try swapping the domain and tell me if it fixes it. That's the whole test.&lt;/li&gt;
&lt;li&gt;Tell me what feature from the original you'd miss most. I'll prioritize that next. I'm keeping a public list.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That's the post. Swap the domain, break it, yell at me.&lt;/p&gt;

&lt;p&gt;— Shay (&lt;a href="https://github.com/shaymanor" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;)&lt;/p&gt;

</description>
      <category>github</category>
      <category>sideprojects</category>
      <category>programming</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
