github Sitecore/content-sdk v2.0.0
2.0.0

9 hours ago

2.0.0

🎉 New Features & Improvements

  • Add Skills.md with capability groupings for AI tools and developers (#382)

    • Add .agents/skills/ with Agent Skills (SKILL.md) per capability for universal AI tooling (agentskills.io); each skill includes when-to-use, hard rules, and stop conditions
    • [create-content-sdk-app] Add Skills.md and .agents/skills/ to Next.js (Pages Router) and Next.js App Router templates so scaffolded apps include capability groupings and template-specific Agent Skills
  • Rework AI coding assistance guides around AGENTS.md (#368)(#390)

  • [nextjs] [create-content-sdk-app] Enable Next.js 16 Cache Components and Turbopack File System Caching (#334)

  • Search integration (#295)

    • [search] New @sitecore-content-sdk/search package providing search functionality
      • SearchService class for performing search queries with support for pagination, sorting, request cancellation.
      • Type-safe search parameters and responses with support for generic fields.
    • [react] Added React hooks for search functionality
      • useSearch hook for paginated search queries with automatic state management, request cancellation, request status tracking.
      • useInfiniteSearch hook for infinite scroll/search patterns with loadMore functionality, request cancellation, request status tracking.
  • [nextjs] [Pages Router] Adjust static path generation when multisite is disabled (#345)

  • [nextjs] Allow to pass custom query parameters to /api/editing/render handlers (#381)

  • [nextjs] [Pages Router] Add explicit Content-Type: text/html; charset=utf-8 to the editing render route response for proper response handling (#386)

  • [analytics-core] [events] [personalize] [core] [create-content-sdk-app] [nextjs] [react] Introduce Analytics packages (#340)(#341)(#357)(#363)

    • Migrated the core,events and personalize packages from CloudSDK to analytics-core,events and personalize packages in ContentSDK
    • Reworked the initialization functionality introducing the new initContentSdk function

🛠 Breaking Changes

  • [core] [content] [nextjs] Support custom Edge hostnames via SITECORE_EDGE_PLATFORM_HOSTNAME (Next.js: NEXT_PUBLIC_SITECORE_EDGE_PLATFORM_HOSTNAME) (#359)

    • New rewriteMediaUrls option: when true, rewrites layout media URLs to the custom Edge hostname; when a function, applies a custom string transformer.
    • The old SITECORE_EDGE_URL environment variable is no longer used
  • Decouple @sitecore-content-sdk/content from @sitecore-content-sdk/core (#351(#383)):

    • See a detailed upgrade guide for migration instructions
  • [nextjs] [create-content-sdk-app] Upgrade to Next.js 16 (#334)(#343)(#353)

    • Next.js 16 is now required (minimum version ^16.0.0)
    • middleware.ts renamed to proxy.ts with updated function signature
    • Removed deprecated images.domains usage (use remotePatterns instead)
  • [nextjs] Expand SXA redirects logic with support for isLanguagePreserved flag. This provides an option to preserve current locale when target redirect URL does not have a locale prefix (#305)

    • This changes the default redirects behavior out of the box.
      • Previously, /da/source -> /target rule would redirect to /da/target path when default locale is not da
      • Now, /da/source -> /target rule would redirect to /target path, using default locale, unless the Shall language be preserved upon redirect? checkbox is enabled in Redirect Map.
  • Upgrade to Node.js 24.x (#332)

  • Remove deprecated api's (#360)

    • sitecore.cli.config:
      • The config property is now required; a reference to sitecore.config must be provided.
      • Build-time functions defined in the build array no longer accept the scConfig argument in their constructor. However, the function implementation must receive scConfig, which is passed internally by the CLI command.
    • renderEmptyPlaceholder method of PlaceholderComponent has been removed; instead import renderEmptyPlaceholder from react/next package
    • DesignLibrary component now does not accept any props
    • SitecoreProvider's loadImportMap is now required
  • [react] [nextjs] Major revamp of components in the react package (#371):

    • Placeholder and AppPlaceholder, passThroughComponentProps prop has been added to fill make passing props to child components easier
    • componentMap and loadImportMap have been added to the context shared via SitecoreProvider
    • useLoadImportMap, useComponentMap HOCs have been removed. The Sitecore context data can be accessed via useSitecore hook.
    • withSitecore's updatePage prop has been renamed to setPage. This HOC has also been marked deprecated, and will eventually be removed in favor of useSitecore hook.
    • Old withPlaceholder HOC implementation has been reworked into slot-like logic with server and client implementations. withAppPlaceholder can be used in server RSC context, and withPlaceholder in client one.
    • Other components and HOCs in react package were refactored and should not have an effect on end user apps.
  • [react] Placeholder suspense causes longer JavaScript Scripting execution time (#384)

    • The default value of disableSuspense property is set to true to avoid forcing Suspense usage across all components which could negatively impact performance metrics. Suspense can now be enabled explicitly when needed.

🐛 Bug Fixes

  • [core] [search] [analytics] Pass Sitecore Context ID only in headers (#336)
  • [core] [DesignLibrary] Fix faux-extentions being stripped from 3rd party modules' names in import-map (#358)
  • [react] [nextjs] [template/nextjs-app-router] Fix not-found page forcing [[...path]] route to dynamic rendering; use cached page params to preserve SSG (#399)(#402)
  • [rect] [nextjs] [DesignStudio] Component does not re-render during editing (#400)
  • [nextjs] [DesignLibrary] In variant generation mode prevent additional re-render for Server Components (#403)

Don't miss a new content-sdk release

NewReleases is sending notifications on new releases.