feat(blog): add blog app with loaders and commerce factory#75
Merged
Conversation
…tory Create reusable blog app for TanStack Start sites with: - Blog types (BlogPost, Author, Category, BlogPostPage, BlogPostListingPage) - CMS records access via loadBlocks() from @decocms/start/cms - Post filtering, sorting, and pagination utilities - 8 loaders (BlogPostPage, BlogPostItem, BlogpostListing, BlogRelatedPosts, GetCategories, Blogpost, Category, Author) - Commerce loader factory (createBlogCommerceLoaders) following the VTEX pattern - App module with manifest and registry entry Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Blog loaders are not commerce-specific — the file name was misleading. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
JonasJesus42
approved these changes
Jun 5, 2026
JonasJesus42
previously approved these changes
Jun 5, 2026
…module Cover handlePosts pure functions, getRecordsByPath CMS access, all 5 loaders, and the blog app configure() entry point (60 tests). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
JonasJesus42
approved these changes
Jun 5, 2026
|
🎉 This PR is included in version 4.1.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
blog/app for TanStack Start sites with types, CMS record access, post filtering/sorting/pagination, and 8 data loaderscreateBlogCommerceLoaders()factory following the same pattern ascreateVtexCommerceLoaders()registry.tsand add./blogexports topackage.jsonTest plan
createBlogCommerceLoaders()registers all expected loader keysgetRecordsByPathreads blog collections from CMS blocksBlogPostItemloader resolves a post by slugBlogpostListingloader with category/search/sort filteringnpm run buildpasses with no type errors🤖 Generated with Claude Code
Summary by cubic
Adds a reusable blog app with CMS-backed types, sorting/filtering/pagination utils, and eight loaders (post page, single post, listings, related posts, categories, authors). Registers
deco-blog, exports./blogentry points, provides acreateBlogLoaders()factory (aliascreateBlogCommerceLoaders), and renames the internal loader map toloaderMap.ts. Adds unit tests for core utilities, CMS records access, loaders, and the module.New Features
getRecordsByPath()reads CMS collections vialoadBlocks()from@decocms/start/cms.BlogPostPage,BlogPostItem,BlogpostListing,BlogRelatedPosts,GetCategories,Blogpost,Category, andAuthor.configure().Migration
createBlogLoaders()into your COMMERCE_LOADERS map (aliascreateBlogCommerceLoaders()kept)../blog/commerceLoaders, switch tocreateBlogLoadersfrom@decocms/apps-start/blog.Written for commit 55759cf. Summary will update on new commits.