Shop: sizes and colors for search engines, photos for link previews #37

Merged
jcoffey-dev merged 1 commits from seo/shop-pages into main 2026-10-17 07:32:20 +00:00
Owner

Found while tuning a real shop for search engines.

  • A product with variants is a schema.org ProductGroup, with one Product per variant: its own price, SKU, size or color, photo and stock. variesBy comes from choose: / choose_group: when they're Size, Color, Material or Pattern.
  • Brand: the product's brand:, else the collection page's, else the site's name.
  • Fix: a collection's list page took its pages' layout for structured data, so the shop page (/products/) was described as a Product called "Shop".
  • A page with photos: and no image: uses its first photo for link previews instead of a drawn card.
  • A tag page with its own content file (content/tags/.md) gets a card. Generated tag pages still don't, so big archives don't grow a card per tag.
  • Starter head: product pages say og:type product with product:price:amount / currency (new price function); the home page's title adds its own title when it differs from the site's name.

gofmt, go vet and go test pass locally. Every other site builds the same except where it has shelves or products.

Found while tuning a real shop for search engines. - A product with variants is a schema.org ProductGroup, with one Product per variant: its own price, SKU, size or color, photo and stock. `variesBy` comes from `choose:` / `choose_group:` when they're Size, Color, Material or Pattern. - Brand: the product's `brand:`, else the collection page's, else the site's name. - Fix: a collection's list page took its pages' layout for structured data, so the shop page (/products/) was described as a Product called "Shop". - A page with `photos:` and no `image:` uses its first photo for link previews instead of a drawn card. - A tag page with its own content file (content/tags/<tag>.md) gets a card. Generated tag pages still don't, so big archives don't grow a card per tag. - Starter head: product pages say `og:type product` with `product:price:amount` / `currency` (new `price` function); the home page's title adds its own title when it differs from the site's name. gofmt, go vet and go test pass locally. Every other site builds the same except where it has shelves or products.
jcoffey-dev added 1 commit 2026-10-17 07:11:20 +00:00
Shop: a product's sizes and colors for search engines, and its photo for link previews
ci / go (pull_request) Successful in 59s
ci / editor-ui (pull_request) Successful in 1m23s
e93959d928
A product with variants is now a schema.org ProductGroup with one Product
per variant (its own price, SKU, size or color, photo and stock), which is
how search engines want variants described. The brand is the product's
brand:, else its collection page's, else the site's name. A collection's
list page no longer takes its pages' layout, so the shop page isn't
described as a product.

A page with photos: and no image: uses its first photo for link previews
instead of a drawn card. A tag page with a content file of its own gets a
card. The starter's head marks product pages og:type product with the price
(the new price function), and the home page's title adds the page's own
title when it differs from the site's name.
jcoffey-dev merged commit 235ee0b30e into main 2026-10-17 07:32:20 +00:00
jcoffey-dev deleted branch seo/shop-pages 2026-10-17 07:32:20 +00:00
Sign in to join this conversation.