@se-studio/contentful-rest-api 2.1.0 → 2.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @se-studio/contentful-rest-api
2
2
 
3
+ ## 2.1.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 2b77d47: Breadcrumb labels use the CMS breadcrumb field, then the slug label the site already passes in. The page title is no longer a crumb, on the page or in the BreadcrumbList, which is built from the same segments. A site on 1.41.x that showed page titles in the trail will show slugs again wherever breadcrumbTitle is empty. Set breadcrumbTitle where the slug is the wrong name. The getBreadcrumbLookup example no longer falls back to the page title.
8
+
3
9
  ## 2.1.0
4
10
 
5
11
  ### Minor Changes
@@ -32,8 +32,8 @@ export type BreadcrumbLookup = Map<string, BreadcrumbLookupEntry>;
32
32
  * preview: false,
33
33
  * next: { revalidate: false }
34
34
  * });
35
- * const label = lookup.get('/locations/new-york/')?.breadcrumbLabel
36
- * ?? lookup.get('/locations/new-york/')?.title;
35
+ * const breadcrumbLabel = lookup.get('/locations/new-york/')?.breadcrumbLabel?.trim() || undefined;
36
+ * // A crumb uses that label, otherwise the site's slug label. The page title is not a crumb.
37
37
  * ```
38
38
  */
39
39
  export declare function getBreadcrumbLookup(context: BaseConverterContext, config: ContentfulConfig, options: FetchOptions): Promise<BreadcrumbLookup>;
@@ -33,8 +33,8 @@ function addLinksToLookup(lookup, links) {
33
33
  * preview: false,
34
34
  * next: { revalidate: false }
35
35
  * });
36
- * const label = lookup.get('/locations/new-york/')?.breadcrumbLabel
37
- * ?? lookup.get('/locations/new-york/')?.title;
36
+ * const breadcrumbLabel = lookup.get('/locations/new-york/')?.breadcrumbLabel?.trim() || undefined;
37
+ * // A crumb uses that label, otherwise the site's slug label. The page title is not a crumb.
38
38
  * ```
39
39
  */
40
40
  export async function getBreadcrumbLookup(context, config, options) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@se-studio/contentful-rest-api",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
4
4
  "description": "Type-safe Contentful REST API client with caching and rate limiting for Next.js applications",
5
5
  "repository": {
6
6
  "type": "git",