- Screenshots retaken from the v1.3.7 demo build (the old set still showed the pre-1.3.3 workout screen with its button rows). The five phone images are now served through <picture> as WebP at 600/1170 px with the PNG as fallback; the hero image is preloaded. website/build-images.sh produces img/ from assets/. - og:image on every page is a 1200×630 card (assets/social.jpg) with width, height and alt; robots meta with max-image-preview:large; preconnect to the analytics host; SoftwareApplication JSON-LD carries version, dates, screenshots and a feature list. - Every page starts with a Skip-to-content link and the content sits in <main id="main">; scroll reveals are also disabled for print. - The GitHub and Discord counters wait for requestIdleCallback instead of racing the hero image. Cache-bust ?v=18. llms.txt names GitHub as the home. - robots.txt, sitemap.xml and llms.txt now live in website/ so the site is fully regenerable from the repo.
18 lines
787 B
Bash
Executable File
18 lines
787 B
Bash
Executable File
#!/usr/bin/env bash
|
||
# Builds the website's img/ folder from ../assets: the five screenshots as PNG (fallback)
|
||
# plus WebP at 600 and 1170 px wide (what <picture> actually serves), and the 1200×630
|
||
# social card. Needs ffmpeg with libwebp. Usage: website/build-images.sh <dist>/img
|
||
set -euo pipefail
|
||
out=${1:?target img dir}; mkdir -p "$out"
|
||
here=$(cd "$(dirname "$0")" && pwd)
|
||
for n in home workout stats plan library; do
|
||
src="$here/../assets/screenshots/$n.png"
|
||
cp "$src" "$out/$n.png"
|
||
for w in 600 1170; do
|
||
ffmpeg -v error -y -i "$src" -vf "scale=$w:-1:flags=lanczos" -c:v libwebp -quality 82 -compression_level 6 "$out/$n-$w.webp"
|
||
done
|
||
done
|
||
cp "$here/../assets/social.jpg" "$out/social.jpg"
|
||
cp "$here/../assets/banner.png" "$out/banner.png"
|
||
echo "images written to $out"
|