feat(blog): shoppable product blocks + hide non-published posts - #1603
Open
yuriassuncx wants to merge 56 commits into
Open
feat(blog): shoppable product blocks + hide non-published posts#1603yuriassuncx wants to merge 56 commits into
yuriassuncx wants to merge 56 commits into
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
Supporting changes
blog/loaders/options/productsByTerm.ts— dynamic-options picker for the Deco adminblog/utils/productReference.ts— canonical refs (platform:kind:id)blog/utils/productResolver.ts— multi-platform resolve/search viactx.invoke(VTEX, Shopify, Wake, WAP)blog/utils/productData.ts— image, price, and link display helpersblog/manifest.gen.ts— registers loader and sectionsTest plan
deno task checkpasses on CIPost publication status (added)
Adds a
statusfield toBlogPostand hides non-published posts from the live site.blog/types.ts—status?: PostStatus+isPublishedStatus()helper. Legacy posts with nostatusare treated as published, so existing content is unaffected.blog/core/records.ts—getRecordsByPathfilters out non-published posts (single chokepoint for every post loader: list, listing, item, related, single-post). Categories/authors have no status → always kept. AnincludeUnpublishedopt-in bypasses the filter.blog/loaders/BlogPostPage.ts— honors?preview=trueto render a draft on its single-post page (for the CMS editor preview), always withnoIndexingso 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.