feat: extract inline favicon to static SVG file

Replace the inline data-URI emoji favicon with a proper Python-logo SVG
served from /static/favicon.svg. Avoids repeated base64 encoding overhead
and allows the icon to be cached and updated independently.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Vinta Chen
2026-03-18 18:34:15 +08:00
parent 95718991f8
commit 25ec0c3937
2 changed files with 7 additions and 4 deletions

View File

@@ -0,0 +1,6 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
<path d="M8 2h16a6 6 0 0 1 6 6v8H2V8a6 6 0 0 1 6-6z" fill="#1d5fa6"/>
<path d="M2 16h28v8a6 6 0 0 1-6 6H8a6 6 0 0 1-6-6z" fill="#f0c73e"/>
<circle cx="11.5" cy="9.5" r="2.2" fill="#f0c73e"/>
<circle cx="20.5" cy="22.5" r="2.2" fill="#1d5fa6"/>
</svg>

After

Width:  |  Height:  |  Size: 320 B

View File

@@ -17,10 +17,7 @@
/>
<meta property="og:url" content="https://awesome-python.com/" />
<meta name="twitter:card" content="summary" />
<link
rel="icon"
href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>🐍</text></svg>"
/>
<link rel="icon" href="/static/favicon.svg" type="image/svg+xml" />
<link rel="stylesheet" href="/static/style.css" />
<script
async