resume_page

Log | Files | Refs | README

commit d885c1f5af4609dfa31115e6d48ca9a537b4e0d2
parent 8debcba97bc3e80b51b01caf91b64c12c5b0a7dc
Author: William Lindholm <william_lindholm@outlook.com>
Date:   Mon, 21 Sep 2026 20:55:19 +0200

Added best practice web components

Diffstat:
MREADME.md | 2++
Mcompose.yml | 6++++++
Mcv/Dockerfile | 2+-
Mcv/index.html | 1+
Mcv/main.py | 10++++++++++
Acv/robots.txt | 4++++
Acv/sitemap.xml | 6++++++
7 files changed, 30 insertions(+), 1 deletion(-)

diff --git a/README.md b/README.md @@ -76,6 +76,8 @@ Use this structure: ├── Dockerfile ├── requirements.txt ├── index.html + ├── robots.txt + ├── sitemap.xml └── style.css ``` diff --git a/compose.yml b/compose.yml @@ -27,6 +27,12 @@ services: - action: sync path: ./cv/style.css target: /app/style.css + - action: sync + path: ./cv/robots.txt + target: /app/robots.txt + - action: sync + path: ./cv/sitemap.xml + target: /app/sitemap.xml - action: rebuild path: ./cv/Dockerfile - action: rebuild 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 ./ +COPY --chown=resume:resume main.py index.html style.css robots.txt sitemap.xml ./ USER resume EXPOSE 8000 CMD ["python", "main.py"] diff --git a/cv/index.html b/cv/index.html @@ -5,6 +5,7 @@ <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="description" content="William Lindholm — software engineer. Curriculum vitae, selected projects, and contact information."> <title>William Lindholm - Curriculum vitae</title> + <link rel="canonical" href="https://cv.lindholmlabs.com/"> <link rel="stylesheet" href="/style.css"> </head> <body> diff --git a/cv/main.py b/cv/main.py @@ -18,6 +18,16 @@ def stylesheet(): return send_from_directory(app.root_path, "style.css") +@app.get("/robots.txt") +def robots(): + return send_from_directory(app.root_path, "robots.txt", mimetype="text/plain") + + +@app.get("/sitemap.xml") +def sitemap(): + return send_from_directory(app.root_path, "sitemap.xml", mimetype="application/xml") + + def duration(start, end=None): start = date.fromisoformat(f"{start}-01") finish = date.fromisoformat(f"{end}-01") if end else date.today() diff --git a/cv/robots.txt b/cv/robots.txt @@ -0,0 +1,4 @@ +User-agent: * +Allow: / + +Sitemap: https://cv.lindholmlabs.com/sitemap.xml diff --git a/cv/sitemap.xml b/cv/sitemap.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> + <url> + <loc>https://cv.lindholmlabs.com/</loc> + </url> +</urlset>