From 5f2b485390a24c43b5a194a7d53b7d8273429212 Mon Sep 17 00:00:00 2001 From: Vuong Hoang Date: Sun, 26 Apr 2026 13:55:51 -0700 Subject: [PATCH] stacks/news-digest: favicon + serve-via-nginx wiring MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Editorial-briefing favicon: 32×32 SVG, Australis palette. Cyan masthead-rule across the top echoes the page's aurora-rule, four descending text-line indicators below evoke a newspaper column. Reads cleanly at 16×16 (the typical browser tab size). Static markup only — no script, no animation — so all browsers honor it for tab + bookmark icons. Linked from both digest.html.j2 and archive.html.j2 with the proper type="image/svg+xml" attribute. Served by nginx from the bind-mounted /output dir alongside index.html and style.css. Deploy playbook also updated to copy the favicon into /output at deploy-time so a fresh deploy doesn't 404 on the icon before the first cron fire. --- playbooks/deploy-news-digest.yaml | 20 ++++++++++++++------ stacks/news-digest/templates/archive.html.j2 | 1 + stacks/news-digest/templates/digest.html.j2 | 1 + stacks/news-digest/templates/favicon.svg | 13 +++++++++++++ 4 files changed, 29 insertions(+), 6 deletions(-) create mode 100644 stacks/news-digest/templates/favicon.svg diff --git a/playbooks/deploy-news-digest.yaml b/playbooks/deploy-news-digest.yaml index 7cb4b9a..6923433 100644 --- a/playbooks/deploy-news-digest.yaml +++ b/playbooks/deploy-news-digest.yaml @@ -80,6 +80,12 @@ steps: dest: "{{ compose_dir }}/templates/style.css" mode: "0644" + - name: Upload templates/favicon.svg + upload: + src: stacks/news-digest/templates/favicon.svg + dest: "{{ compose_dir }}/templates/favicon.svg" + mode: "0644" + - name: Seed .env from template (only if absent) upload: src: stacks/news-digest/.env.example @@ -104,12 +110,14 @@ steps: cd {{ compose_dir }} && DOCKER_BUILDKIT=0 docker compose build 2>&1 \ | grep -vE '^Step [0-9]+/[0-9]+ : (RUN|COPY)|^Removing intermediate|^ ---> |^ ---> Running|Collecting|Downloading|Requirement|Using cached|Installing collected|Successfully (installed|built)|━' - - name: Pre-stage style.css into /output so the first page render works - # Worker writes index.html which references "style.css" (relative). - # The CSS isn't generated by the worker; nginx serves whichever - # copy lands at /usr/share/nginx/html/style.css. Copy the template - # CSS into the bind-mounted /output dir at deploy-time. - shell: cp -f {{ compose_dir }}/templates/style.css {{ output_dir }}/style.css + - name: Pre-stage style.css + favicon.svg into /output for nginx + # The worker writes HTML that references "style.css" and + # "favicon.svg" (relative). Neither is generated dynamically; + # nginx serves whichever copy lands at /usr/share/nginx/html/. + # Copy both from the templates dir at deploy-time. + shell: | + cp -f {{ compose_dir }}/templates/style.css {{ output_dir }}/style.css + cp -f {{ compose_dir }}/templates/favicon.svg {{ output_dir }}/favicon.svg - name: docker compose up -d shell: cd {{ compose_dir }} && docker compose up -d diff --git a/stacks/news-digest/templates/archive.html.j2 b/stacks/news-digest/templates/archive.html.j2 index 3272e01..26c5353 100644 --- a/stacks/news-digest/templates/archive.html.j2 +++ b/stacks/news-digest/templates/archive.html.j2 @@ -4,6 +4,7 @@ Daily Digest · Archive + diff --git a/stacks/news-digest/templates/digest.html.j2 b/stacks/news-digest/templates/digest.html.j2 index 749f971..564e2a6 100644 --- a/stacks/news-digest/templates/digest.html.j2 +++ b/stacks/news-digest/templates/digest.html.j2 @@ -4,6 +4,7 @@ Daily Digest · {{ date_long }} · {{ edition_short }} + diff --git a/stacks/news-digest/templates/favicon.svg b/stacks/news-digest/templates/favicon.svg new file mode 100644 index 0000000..74bfdb3 --- /dev/null +++ b/stacks/news-digest/templates/favicon.svg @@ -0,0 +1,13 @@ + + + Daily Digest + Masthead rule across the top with descending text-line indicators below — reads as "stacked headlines / news columns" at any size. Australis palette: cool-black surface, bright-cyan masthead, bright-70 / dark-50 text lines. + + + + + + + + +