diff --git a/README.md b/README.md index aa8926a..e01c1b4 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,7 @@ Organization-level defaults for the **drumandbytes** GitHub org. | [`profile/README.md`](profile/README.md) | Renders as the org landing page at [github.com/drumandbytes](https://github.com/drumandbytes). | | [`profile/assets/`](profile/assets/) | Images used by the profile page (banner, etc.). | | [`profile/scripts/update_profile.py`](profile/scripts/update_profile.py) | Regenerates the `BLOG-POSTS` block in the profile from the blog RSS feed. | +| [`profile/social/`](profile/social/) | Branded 1280×640 social-preview cards for the shared repos (uploaded to each repo by hand — see its README). | | [`.github/workflows/update-profile.yml`](.github/workflows/update-profile.yml) | Runs that script daily and commits the result (as the `dnb-robot` app). | | [`.github/workflows/ci.yml`](.github/workflows/ci.yml) | actionlint + `ruff` + template validation on every PR; the gate for auto-merge. | | [`.github/dependabot.yml`](.github/dependabot.yml) | Weekly grouped bumps for the actions used in `.github/workflows/`. | diff --git a/profile/social/README.md b/profile/social/README.md new file mode 100644 index 0000000..4402de5 --- /dev/null +++ b/profile/social/README.md @@ -0,0 +1,37 @@ +# Social preview cards + +1280×640 type-only cards for the repos that get shared externally. They give +`github.com/drumandbytes/*` links a consistent branded unfurl instead of +GitHub's auto-generated counter card. + +## Not automated — upload each one by hand + +A repo's social preview image is a GitHub **setting**, not a file in the repo. +There is no API for it. For each PNG below: + +**` → Settings → General → Social preview → Edit → Upload an image`** + +| File | Upload to | +|---|---| +| `eraser.png` | `drumandbytes/eraser` | +| `f1-walk.png` | `drumandbytes/f1-walk` | +| `road-conditions-ee.png` | `drumandbytes/road-conditions-ee` | +| `opentofu-updater-action.png` | `drumandbytes/opentofu-updater-action` | +| `argocd-gitops-updater-action.png` | `drumandbytes/argocd-gitops-updater-action` | + +Verify with [opengraph.xyz](https://www.opengraph.xyz/) or by pasting the repo +URL into Slack. Platforms cache unfurls, so an old card may linger. + +The org page (`github.com/drumandbytes`) can't have a custom one — that's a +repo-only setting. + +## Regenerating + +```sh +./generate.sh +``` + +Requires ImageMagick 7. Edit the tagline table at the bottom of the script; +keep taglines to ~1–2 lines. The design is deliberately minimal (dark ground, +orange accent bar matching `drumandbytes.com`, repo name + tagline) so the +whole set reads as one system. diff --git a/profile/social/argocd-gitops-updater-action.png b/profile/social/argocd-gitops-updater-action.png new file mode 100644 index 0000000..082ebee Binary files /dev/null and b/profile/social/argocd-gitops-updater-action.png differ diff --git a/profile/social/eraser.png b/profile/social/eraser.png new file mode 100644 index 0000000..5f6b1ca Binary files /dev/null and b/profile/social/eraser.png differ diff --git a/profile/social/f1-walk.png b/profile/social/f1-walk.png new file mode 100644 index 0000000..401a001 Binary files /dev/null and b/profile/social/f1-walk.png differ diff --git a/profile/social/generate.sh b/profile/social/generate.sh new file mode 100755 index 0000000..35ebfe9 --- /dev/null +++ b/profile/social/generate.sh @@ -0,0 +1,49 @@ +#!/bin/bash +# Regenerate the org's social preview cards (1280x640, type-only). +# +# These are NOT referenced by anything — a repo's social preview image is a +# GitHub setting, uploaded by hand at Settings -> General -> Social preview. +# This script just keeps the set reproducible and consistent. After running, +# upload each PNG to the matching repo. +# +# Requires ImageMagick 7 (`magick`). Font paths below are macOS; override +# FONT_BOLD / FONT_REG for other platforms. +set -euo pipefail +cd "$(dirname "$0")" + +FONT_BOLD="${FONT_BOLD:-/System/Library/Fonts/Supplemental/Arial Bold.ttf}" +FONT_REG="${FONT_REG:-/System/Library/Fonts/SFNS.ttf}" + +W=1280; H=640 +BG="#0D1117"; ACCENT="#FF6633" +NAME_COL="#FFFFFF"; TAG_COL="#8B98A5"; FOOT_COL="#5B6B82" +M=100; NAME_PT=62; TAG_PT=31; GAP=30 + +card() { # + local slug="$1" tag="$2" out="$1.png" + magick -size ${W}x${H} xc:"$BG" -fill "$ACCENT" -draw "rectangle 0,0 14,${H}" PNG:/tmp/_s_base.png + magick -background none -fill "$NAME_COL" -font "$FONT_BOLD" -pointsize $NAME_PT \ + label:"$slug" -trim +repage PNG:/tmp/_s_name.png + magick -background none -fill "$TAG_COL" -font "$FONT_REG" -pointsize $TAG_PT \ + -interline-spacing 10 -size 980x caption:"$tag" -trim +repage \ + -background none -splice 0x${GAP} PNG:/tmp/_s_tag.png + magick -background none -fill "$FOOT_COL" -font "$FONT_REG" -pointsize 25 \ + label:"drumandbytes.com" PNG:/tmp/_s_foot.png + magick /tmp/_s_base.png \ + \( /tmp/_s_name.png /tmp/_s_tag.png -background none -gravity West -append \) \ + -gravity West -geometry +${M}+0 -composite \ + /tmp/_s_foot.png -gravity SouthWest -geometry +${M}+60 -composite \ + "$out" + echo "wrote $out" +} + +card "eraser" \ + "Free, open-source data-broker removal — automated GDPR / CCPA opt-out requests to 700+ brokers." +card "f1-walk" \ + "Fan-made PWA walking guides to real F1 street circuits. GPS tracking, corner-by-corner history, offline support." +card "road-conditions-ee" \ + "Teesilm — a faster, offline-capable PWA for Estonian road and weather conditions." +card "opentofu-updater-action" \ + "Keeps OpenTofu / Terraform providers, modules, Helm charts and images up to date via pull requests." +card "argocd-gitops-updater-action" \ + "Automated Helm chart and image version bumps for GitOps repos. ArgoCD and Kustomize aware." diff --git a/profile/social/opentofu-updater-action.png b/profile/social/opentofu-updater-action.png new file mode 100644 index 0000000..c36b4ed Binary files /dev/null and b/profile/social/opentofu-updater-action.png differ diff --git a/profile/social/road-conditions-ee.png b/profile/social/road-conditions-ee.png new file mode 100644 index 0000000..b8f163b Binary files /dev/null and b/profile/social/road-conditions-ee.png differ