diff --git a/scripts/build-assets.sh b/scripts/build-assets.sh index 335f379..2d5031f 100755 --- a/scripts/build-assets.sh +++ b/scripts/build-assets.sh @@ -1,6 +1,8 @@ #!/usr/bin/env bash -# Render site/assets/banner.html to PNG in both themes with headless Chrome. -# The PNGs are build output. Edit banner.html, never the images. +# Render the image assets with headless Chrome. +# banner.html -> banner-light.png / banner-dark.png (1600x400, README header) +# social.html -> social-card.png (1280x640, link previews) +# The PNGs are build output. Edit the HTML, never the images. set -euo pipefail cd "$(dirname "$0")/.." CHROME="${CHROME:-/Applications/Google Chrome.app/Contents/MacOS/Google Chrome}" @@ -19,3 +21,10 @@ for theme in light dark; do rm -rf "$tmp" echo "rendered site/assets/banner-$theme.png" done + +# Social card. Link previews are 2:1 and crop toward the centre, so this is a +# different composition rather than a resize of the wide banner. +"$CHROME" --headless --disable-gpu --hide-scrollbars \ + --force-device-scale-factor=1 --window-size=1280,640 \ + --screenshot="site/assets/social-card.png" "file://$PWD/site/assets/social.html" >/dev/null 2>&1 +echo "rendered site/assets/social-card.png" diff --git a/site/assets/social-card.png b/site/assets/social-card.png new file mode 100644 index 0000000..f5590e3 Binary files /dev/null and b/site/assets/social-card.png differ diff --git a/site/assets/social.html b/site/assets/social.html new file mode 100644 index 0000000..facab0f --- /dev/null +++ b/site/assets/social.html @@ -0,0 +1,71 @@ + + +
+ + + +Teach your AI agent to tidy your machine
+