Skip to content

feat(blog): shoppable product blocks + hide non-published posts - #1603

Open
yuriassuncx wants to merge 56 commits into
deco-cx:mainfrom
yuriassuncx:feat/autonomous-blog-compatibility
Open

feat(blog): shoppable product blocks + hide non-published posts#1603
yuriassuncx wants to merge 56 commits into
deco-cx:mainfrom
yuriassuncx:feat/autonomous-blog-compatibility

Conversation

@yuriassuncx

@yuriassuncx yuriassuncx commented May 27, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds three shoppable product blocks to the blog app for autonomous-blog content, with a searchable admin product picker backed by the site storefront integration.

  • ProductCard — compact card with image, name, price, and CTA
  • ProductHighlight — full-width featured product layout
  • ProductShelf — horizontally scrollable row of products

Supporting changes

  • blog/loaders/options/productsByTerm.ts — dynamic-options picker for the Deco admin
  • blog/utils/productReference.ts — canonical refs (platform:kind:id)
  • blog/utils/productResolver.ts — multi-platform resolve/search via ctx.invoke (VTEX, Shopify, Wake, WAP)
  • blog/utils/productData.ts — image, price, and link display helpers
  • blog/manifest.gen.ts — registers loader and sections

Test plan

  • Install blog app on a site with a commerce integration (VTEX, Shopify, Wake, or WAP)
  • Add Product Card, Product Highlight, and Product Shelf blocks to a blog post
  • Confirm the product picker searches and returns labeled options
  • Preview: blocks render image, formatted price, and product link
  • deno task check passes on CI

Post publication status (added)

Adds a status field to BlogPost and hides non-published posts from the live site.

  • blog/types.tsstatus?: PostStatus + isPublishedStatus() helper. Legacy posts with no status are treated as published, so existing content is unaffected.
  • blog/core/records.tsgetRecordsByPath filters out non-published posts (single chokepoint for every post loader: list, listing, item, related, single-post). Categories/authors have no status → always kept. An includeUnpublished opt-in bypasses the filter.
  • blog/loaders/BlogPostPage.ts — honors ?preview=true to render a draft on its single-post page (for the CMS editor preview), always with noIndexing so a leaked URL is never indexed.

The 5 post loaders are otherwise unchanged. Pairs with the status work in decocms/studio#4302 (editor UI) and the spire-agent migration that writes post.status.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants