Shop: Fourthwall import, sizes and colors, and a cart #31

Merged
jcoffey-dev merged 3 commits from shop/fourthwall into main 2026-10-17 00:13:31 +00:00
3 Commits
Author SHA1 Message Date
jcoffey-dev 4935aa0fbc Fourthwall test: a plain example product
ci / editor-ui (pull_request) Successful in 1m18s
ci / go (pull_request) Successful in 1m21s
2026-10-16 15:57:16 -07:00
jcoffey-dev 0a2e0f33f6 Shop: Fourthwall import, sizes and colors, and a cart
ci / editor-ui (pull_request) Successful in 1m19s
ci / go (pull_request) Successful in 1m30s
hotdog-cms import fourthwall brings a Fourthwall shop's public products
in as shop pack pages, with the storefront token from
HOTDOG_FOURTHWALL_TOKEN: description and details as Markdown, photos
brought into the site, sizes and colors as variants, collections as
terms of a taxonomy. It's run again whenever the shop changes: products
are matched by id, unchanged pages and photos are left alone, front
matter the site added is kept, and products that left the shop are
listed (deleted with -prune).

The shop pack (1.2.0) takes variants: each with a price and a buy link,
or, when the product has a checkout form (Fourthwall's reads the choice
from its address), a size picker whose Buy now goes straight to the
checkout. Both work without a script. Prices that vary show "From", and
search engines get an AggregateOffer.

cart: true in site.yaml turns on a cart: HotDog's cart script, kept in
the visitor's browser and sent nowhere until checkout, which opens the
shop's checkout with every item (id:quantity, joined). Product pages get
Add to cart beside Buy now; the cart page (layout: cart) lists, changes
and removes items and suggests other products, those sharing a tag
first. Themes put {{ cart }} in the head and {{ cartLink }} in the
header, as the starter now does, and the privacy notice says where the
cart is kept.
2026-10-16 15:47:57 -07:00
jcoffey-dev 7c26d6de9b Pictures: transparent WebP stays WebP; picture for templates
A WebP with transparency (a product photographed on nothing, as print
shops supply them) was turned into a lossless PNG, often ten times the
size and slow to make. It now stays WebP, lossy with its transparency,
at each size; an opaque WebP still becomes JPEG. The media index takes a
picture whose only file is a WebP.

Templates get what Markdown pictures had: picture "/media/x.webp" "alt"
"sizes" "class=x loading=lazy" writes the <img> with its width, height
and every published size, and pictureAt "/media/x.webp" 160 is the
address of the smallest size at least that wide.
2026-10-16 15:47:50 -07:00