Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feat] - VTEX - Legacy #1022

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion vtex/loaders/legacy/productDetailsPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,9 @@ async function loader(
: page.product,
seo: {
title: product.productTitle || product.productName,
description: product.metaTagDescription,
description: props.advancedConfigs?.preferDescription
? product.description
: product.metaTagDescription,
canonical: new URL(`/${product.linkText}/p`, url.origin).href,
noIndexing: props.indexingSkus ? false : !!skuId,
},
Expand Down
3 changes: 3 additions & 0 deletions vtex/utils/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1520,6 +1520,9 @@ export interface Promotion {
export interface AdvancedLoaderConfig {
/** @description Specifies an array of attribute names from the original object to be directly included in the transformed object. */
includeOriginalAttributes: string[];

/** @description Allow this field if you prefer to use description instead of metaTagDescription */
preferDescription?: boolean;
}

export type Maybe<T> = T | null | undefined;
Loading