commit 40815fae43e32799f14ca16e7fadc252fd0dd3b3
parent 8362b412f2e7720ef041cb9b4a6affc91437c9b2
Author: William Lindholm <william_lindholm@outlook.com>
Date: Tue, 22 Sep 2026 15:49:52 +0200
Add favicon
Diffstat:
5 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/compose.yml b/compose.yml
@@ -29,6 +29,9 @@ services:
path: ./cv/style.css
target: /app/style.css
- action: sync
+ path: ./cv/favicon.svg
+ target: /app/favicon.svg
+ - action: sync
path: ./cv/robots.txt
target: /app/robots.txt
- action: sync
diff --git a/cv/Dockerfile b/cv/Dockerfile
@@ -9,7 +9,7 @@ RUN pip install --no-cache-dir -r requirements.txt \
&& useradd --uid 10001 --create-home resume \
&& chown resume:resume /app
-COPY --chown=resume:resume main.py index.html style.css robots.txt sitemap.xml ./
+COPY --chown=resume:resume main.py index.html style.css favicon.svg robots.txt sitemap.xml ./
USER resume
EXPOSE 8000
CMD ["python", "main.py"]
diff --git a/cv/favicon.svg b/cv/favicon.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><rect width="64" height="64" rx="8" fill="#007acc"/><path fill="#fff" d="M18 13h10v29h19v9H18z"/></svg>
diff --git a/cv/index.html b/cv/index.html
@@ -7,6 +7,7 @@
<title>William Lindholm - Curriculum vitae</title>
<link rel="canonical" href="https://cv.lindholmlabs.com/">
<link rel="stylesheet" href="/style.css">
+ <link rel="icon" type="image/svg+xml" href="/favicon.svg">
</head>
<body>
<a class="skip-link" href="#main">Skip to curriculum vitae</a>
diff --git a/cv/main.py b/cv/main.py
@@ -23,6 +23,11 @@ def robots():
return send_from_directory(app.root_path, "robots.txt", mimetype="text/plain")
+@app.get("/favicon.svg")
+def favicon():
+ return send_from_directory(app.root_path, "favicon.svg", mimetype="image/svg+xml")
+
+
@app.get("/sitemap.xml")
def sitemap():
return send_from_directory(app.root_path, "sitemap.xml", mimetype="application/xml")