github Sitecore/content-sdk @sitecore-content-sdk/nextjs@2.5.0

Minor Changes

  • Add sitecore-tools project experimental list to show the experimental features available in the current Content SDK app. (e1d0156)
    The command reads the app's framework package (@sitecore-content-sdk/nextjs or @sitecore-content-sdk/angular) and prints each feature with its enabled status. Framework packages now export experimentalFeaturesCatalog from their /experimental entry.

  • Schema.org & JSON-LD Support (b858df1)

  • minor @sitecore-content-sdk/content dependency update:

    • [angular] Metadata, Open Graph and Schema.org & JSON-LD Support

    • @sitecore-content-sdk/content: resolvePageMetadataFields (with PageMetadataRouteFields / ResolvedPageMetadataFields) moved from @sitecore-content-sdk/nextjs to @sitecore-content-sdk/content/layout, so every framework shares the same field-to-tag rules. @sitecore-content-sdk/nextjs keeps re-exporting PageMetadataRouteFields.

    • @sitecore-content-sdk/angular: added PageMetadataService + <sc-page-meta-tags [route]> (<title>, metadata and Open Graph <meta> tags via Angular's Title/Meta services) and JsonLdSchemaService + <sc-json-ld-schema [page]> (a single <script type="application/ld+json"> in <head>, normal mode only). Re-exported the PageMetadataFields, MetadataFields, OpenGraphFields, OpenGraphImageField(Value) and PageMetadataRouteFields types.

    • Angular template: LayoutComponent renders both components; RouteFields extends PageMetadataFields. (c7801c3)

      • Avoid throwing errors in scClient calls when context ID in browser is missing.
    • Replaces the GraphQL client used by scClient with no-op fallback in browser context, when public content ID is missing, preventing getPage(), getDictionary() and other GraphQL-bound method from throwing.
    • Adds a guard into getHeadLinks() call to return empty results when client context ID is missing, instead of throwing an error.
    • Client Context ID becomes required for rendering head links. (5184ea7)
    • Apply rewriteMediaUrls to SitecoreClient.getData results so custom Experience Edge hostnames are rewritten in component GraphQL data. (5509bcd)
    • Schema.org & JSON-LD Support (b858df1)
  • minor @sitecore-content-sdk/react dependency update:

    • Schema.org & JSON-LD Support (b858df1)

Patch Changes

  • [angular] Metadata, Open Graph and Schema.org & JSON-LD Support (c7801c3)

    • @sitecore-content-sdk/content: resolvePageMetadataFields (with PageMetadataRouteFields / ResolvedPageMetadataFields) moved from @sitecore-content-sdk/nextjs to @sitecore-content-sdk/content/layout, so every framework shares the same field-to-tag rules. @sitecore-content-sdk/nextjs keeps re-exporting PageMetadataRouteFields.
    • @sitecore-content-sdk/angular: added PageMetadataService + <sc-page-meta-tags [route]> (<title>, metadata and Open Graph <meta> tags via Angular's Title/Meta services) and JsonLdSchemaService + <sc-json-ld-schema [page]> (a single <script type="application/ld+json"> in <head>, normal mode only). Re-exported the PageMetadataFields, MetadataFields, OpenGraphFields, OpenGraphImageField(Value) and PageMetadataRouteFields types.
    • Angular template: LayoutComponent renders both components; RouteFields extends PageMetadataFields.
  • Fix App Router redirect-map rules not matching locale-prefixed paths. RedirectsProxy now removes the request locale from the path before matching, so a rule like ^/page$ matches /page, /en/page and /da/page, even when that locale isn't listed in redirects.locales. A target locale taken from a regex capture keeps its configured casing (for example en-CA). (96d3617)

  • Added getPathname helper to ProxyBase. Updated LocaleProxy, MultisiteProxy and PersonalizeProxy to use this helper. (2b0c7c2)

  • Merge the style passed to Image and NextImage over the default empty image placeholder's inline styles, so the 48px minimum size can be overridden. (f70de24)

  • Honor custom modifyComponentProps callbacks in the Next.js Placeholder after injecting component data. Use rendering UIDs for placeholder component and error boundary keys, falling back to the layout component name and index when no UID is available. (643022e)

  • MultisiteProxy now resolves the site from the unprefixed site query string parameter only for draft mode App Router requests, so third-party requests containing ?site=... no longer override the resolved site or overwrite the sc_site cookie. (d6b8d75)

    If you need to force the site via query string, use the sc_site parameter (the supported one) instead of site. Site resolution in editing is unaffected.

  • Enable Turbopack support for the component props loader in the Next.js Pages Router template, so getComponentServerProps is stripped from client bundles. Also fix the loader's package export path and make the webpack rule work on all platforms. (f0d8e2f)

  • Expose buildSitecoreItemCacheTag since it is common to want cache GraphQL responses from Sitecore for a page and have them revalidate on publish. (aafdea4)

  • Fix 403 Forbidden for public folder static files (e.g. .svg, .woff2) in Pages Builder editing mode. PreviewProxy now skips known static asset extensions, and the template proxy.ts matcher excludes them. (39e7906)

Don't miss a new content-sdk release

NewReleases is sending notifications on new releases.