Repository navigation
Conversation
Sections, pages and loaders on @decocms/blocks 8: block functions and their Props, descriptors vs elements, client components in place of islands and HTMX, page blocks and route params, loaders as block functions with the per-client memo, the lazy built-in and per-section Suspense with skeletons, SEO fed by the same loader as the page, and the review before deco push. Co-Authored-By: Claude Opus 5.5 <[email protected]>
- loaders.md: identity functions are content or pages, not loaders - loaders.md: the secrets example used an EmailClient type that no package exports; replace it with a key closed over an instrumented fetch - loaders.md: DEGRADED_HEADER needs every block awaited before answering - seo.md: canonicalFromBreadcrumblist picks the highest position - sections.md: props are fresh copies; loader results inside them are shared - pages.md: a replaced page types its own seo field Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
Author
|
Superseded by #800, which merged these commits together. |
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.
What this adds
A new agent skill,
.agents/skills/deco-site-authoring, for writing sections, pages and loaders on @decocms/blocks 8 with @decocms/tanstack or @decocms/nextjs. It covers:.deco/index.tsand their Props"use client"components in place of islands or HTMXlazyblock, one promise per section with Suspense, and loading skeletonsdeco pushSKILL.mdis an index. The references are:references/sections.mdreferences/pages.mdreferences/loaders.mdreferences/lazy-blocks.mdreferences/seo.mdreferences/review-before-publish.mdSources consolidated
new-section,new-page,review,seo-sections(core idea only),deco-async-rendering-site-guide(skeleton craft only).agents/skills/deco-cms-route-config(its seo.md checklist)packages/blocks/src/v8(resolver, builtins,lazy,matchRoute, the schema generator,deco check) and from the examplesDropped as v7/Fresh-only
islands/folder and HTMXhx-*requests. They become"use client"components plus server functions or server actions.export const loader = (props, req, ctx)andctx.invoke. In v8 a block function gets one argument.@decocms/compat-v7/sectionsis mentioned for migrations only.website/functions/requestToParam.tsand the/:slug*splat. v8 usesmatchRouteparams passed by the page loader, and only a trailing/*.updateJson,patchFileand others). They are replaced by Studio,deco diff/push --draft/publish, and git.website/pages/Page.tsxandSeoV2as types to write. They now resolve only through legacy aliases.Rendering/Lazy.tsx,LoadingFallback,setAsyncRenderingConfig, viewport-deferred sections, deferred SEO, bot-only SSR. Only the skeleton craft was kept, as Suspense fallbacks.cache: "stale-while-revalidate"). The skill points at the upstream client'sfetchand atdeco-storefront-caching.apps/widget and commerce imports. They are replaced by@decocms/compat-v7/types/widgetsand@decocms/compat-v7/commerce/types.Fact-check
A second pass checked every API, export, CLI flag, error message and behavior against
packages/andexamples/. The second commit fixes these:seo) are grouped as content or pages, not loaders.EmailClienttype that no package exports. It now closes over an API key withcreateInstrumentedFetch.DEGRADED_HEADERmeans awaiting every block before the page answers, so that page does not stream.canonicalFromBreadcrumblistreturns the item with the highestposition.pagetypes its ownseofield.Not verifiable in this repo
c.resolve({ ...section, slug }), or a nested loader resolved throughcurrentClient().resolve), which the resolver supports. The docs site (/next/*) is not in this repo. If it recommends a different convention,pages.md,loaders.mdandseo.mdshould follow it.deco-site-workflow,deco-cms-schema,deco-tanstack-site,deco-nextjs-site,deco-variants,deco-apps,deco-images-media,deco-storefront-performance,deco-storefront-caching). Those skills land in their own PRs.README table
bun run skills:checkpasses. The skills table in.agents/skills/README.mdwas regenerated withbun run skills:readme. Sibling skill PRs regenerate the same table, so they will conflict there. After rebasing, runbun run skills:readmeand commit the result.🤖 Generated with Claude Code
Summary by cubic
Adds the
deco-site-authoringagent skill for writing sections, pages, and loaders on@decocms/blocks8 with@decocms/tanstackor@decocms/nextjs..deco/index.ts, React sections as descriptors or elements,"use client"components in place of islands and HTMX, page blocks with path templates and route params, loaders as block functions, thelazybuilt-in with Suspense skeletons, SEO and JSON-LD, and the pre-publish review.islands/, section-level(props, req)loaders, and block-level loader caching..agents/skills/README.md. Sibling skill PRs may conflict on that table; runbun run skills:readmeafter rebasing.Not verifiable in this repo
Written for commit ba79bfc. Summary will update on new commits.