From f34c3e2ec580289a0d1f04f27ff07265da4f73d1 Mon Sep 17 00:00:00 2001 From: John Coffey Date: Sun, 11 Oct 2026 17:29:04 -0700 Subject: [PATCH] Shop pack: a product catalog with checkout links Products with photos, a price, options and a Buy button that opens the payment provider's own checkout (Stripe Payment Links, PayPal, Square). No cart, no card details on the site, no script. Product data for search engines (price, currency, in stock or sold out), and a money template function: 24 "USD" is $24.00, 9 "SEK" is 9.00 SEK. --- docs/packs.md | 8 +-- internal/build/build_test.go | 12 +++++ internal/build/funcs.go | 2 + internal/build/schema.go | 74 +++++++++++++++++++++++++++ internal/packs/bundled_test.go | 9 ++++ packs/packs.go | 2 +- packs/shop/LICENSE | 21 ++++++++ packs/shop/README.md | 15 ++++++ packs/shop/assets/shop.css | 17 ++++++ packs/shop/layouts/product.html | 27 ++++++++++ packs/shop/layouts/shop.html | 9 ++++ packs/shop/pack.yaml | 33 ++++++++++++ packs/shop/partials/product-card.html | 8 +++ packs/shop/sections/products.html | 19 +++++++ 14 files changed, 252 insertions(+), 4 deletions(-) create mode 100644 packs/shop/LICENSE create mode 100644 packs/shop/README.md create mode 100644 packs/shop/assets/shop.css create mode 100644 packs/shop/layouts/product.html create mode 100644 packs/shop/layouts/shop.html create mode 100644 packs/shop/pack.yaml create mode 100644 packs/shop/partials/product-card.html create mode 100644 packs/shop/sections/products.html diff --git a/docs/packs.md b/docs/packs.md index fb8d610..2c8fb65 100644 --- a/docs/packs.md +++ b/docs/packs.md @@ -50,14 +50,16 @@ Content-Security-Policy as the site's own. tags with it; - **share-links**: plain share links for Mastodon, Bluesky, LinkedIn and email, with no tracking; + - **shop**: a product catalog with a page per product, each Buy button + opening your payment provider's checkout (no cart); - **table-of-contents**: a long page's headings, linked, at its top; - **team**: a page per person, a list of everyone and a section; - **testimonials**: quotes with a name and a role. - `-site` picks the site folder (default: the current one). -**Search engines.** The faq, location-and-hours, team, recipes and jobs packs -are also written as schema.org data (FAQPage, LocalBusiness, Person, Recipe, -JobPosting), which search engines use for richer results. A pack can't carry +**Search engines.** The faq, location-and-hours, team, recipes, jobs and shop +packs are also written as schema.org data (FAQPage, LocalBusiness, Person, +Recipe, JobPosting, Product), which search engines use for richer results. A pack can't carry the `