Skip to content

Commit

Permalink
Rename 'sitemapRepresentation' arboretum option to 'pageRelations'
Browse files Browse the repository at this point in the history
  • Loading branch information
Dacjan committed Oct 18, 2024
1 parent 4eb1de8 commit e171c2a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/arboretum-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
export type ArboretumClientOptions = {
data?: CachedDataT;
eagerly?: boolean;
sitemapRepresentation?: "parent-to-children" | "child-to-parent";
pageRelations?: "parent-to-children" | "child-to-parent";
includeEntryStatus?: boolean;
};

Expand Down Expand Up @@ -77,7 +77,7 @@ export type ArboretumClientConfigFromCdaT = {
};
options?: Pick<
ArboretumClientOptions,
"data" | "eagerly" | "sitemapRepresentation"
"data" | "eagerly" | "pageRelations"
>;
};

Expand All @@ -99,7 +99,7 @@ export type ArboretumClientConfigFromCdaParamsT = {
};
options?: Pick<
ArboretumClientOptions,
"data" | "eagerly" | "sitemapRepresentation"
"data" | "eagerly" | "pageRelations"
>;
};

Expand Down Expand Up @@ -161,7 +161,7 @@ export type ArboretumClientOptionsT = Pick<
ArboretumClientContentfulConfigOptionsT,
"pageContentTypes" | "redirectContentType"
> &
Pick<ArboretumClientOptions, "includeEntryStatus" | "sitemapRepresentation">;
Pick<ArboretumClientOptions, "includeEntryStatus" | "pageRelations">;

export type ArboretumClientT = {
homePage: (
Expand Down
2 changes: 1 addition & 1 deletion src/impl/arboretum-client.impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ export const createArboretumClient = async (
options: {
...options,
includeEntryStatus,
sitemapRepresentation: config.options?.sitemapRepresentation,
pageRelations: config.options?.pageRelations,
},
localeTagIdPrefix,
pageHomeTagId: options.homePageTagId || pageHomeTagId,
Expand Down
2 changes: 1 addition & 1 deletion src/impl/sitemap/helpers/build-localized-sitemap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ export const buildLocalizedSitemap = (

if (homePageEntry) {
const childrenRefsByPageId =
options.sitemapRepresentation === "child-to-parent"
options.pageRelations === "child-to-parent"
? getChildrenRefsByParentId(data, locale, options)
: undefined;

Expand Down

0 comments on commit e171c2a

Please sign in to comment.