pinelab-storefront-client
Advanced tools
Comparing version 0.48.0 to 0.49.0
@@ -23,6 +23,6 @@ 'use strict'; | ||
[ | ||
'\n fragment ProductFields on Vendure_Product {\n id\n name\n slug\n assets {\n preview\n thumbnail\n }\n facetValues {\n code\n name\n facet {\n code\n name\n }\n }\n featuredAsset {\n id\n preview\n thumbnail\n }\n description\n variants {\n id\n name\n priceWithTax\n productId\n stockLevel\n options {\n id\n name\n group {\n id\n name\n }\n }\n assets {\n id\n preview\n thumbnail\n }\n featuredAsset {\n id\n preview\n thumbnail\n }\n }\n }\n', | ||
'\n fragment ProductFields on Vendure_Product {\n id\n name\n slug\n assets {\n preview\n thumbnail\n }\n facetValues {\n code\n name\n facet {\n code\n name\n }\n }\n featuredAsset {\n id\n preview\n thumbnail\n }\n description\n variants {\n id\n name\n priceWithTax\n productId\n stockLevel\n options {\n id\n name\n group {\n id\n name\n }\n }\n assets {\n id\n preview\n thumbnail\n }\n featuredAsset {\n id\n preview\n thumbnail\n }\n }\n customFields {\n metaTitle\n metaDescription\n }\n }\n', | ||
], | ||
[ | ||
'\n fragment ProductFields on Vendure_Product {\n id\n name\n slug\n assets {\n preview\n thumbnail\n }\n facetValues {\n code\n name\n facet {\n code\n name\n }\n }\n featuredAsset {\n id\n preview\n thumbnail\n }\n description\n variants {\n id\n name\n priceWithTax\n productId\n stockLevel\n options {\n id\n name\n group {\n id\n name\n }\n }\n assets {\n id\n preview\n thumbnail\n }\n featuredAsset {\n id\n preview\n thumbnail\n }\n }\n }\n', | ||
'\n fragment ProductFields on Vendure_Product {\n id\n name\n slug\n assets {\n preview\n thumbnail\n }\n facetValues {\n code\n name\n facet {\n code\n name\n }\n }\n featuredAsset {\n id\n preview\n thumbnail\n }\n description\n variants {\n id\n name\n priceWithTax\n productId\n stockLevel\n options {\n id\n name\n group {\n id\n name\n }\n }\n assets {\n id\n preview\n thumbnail\n }\n featuredAsset {\n id\n preview\n thumbnail\n }\n }\n customFields {\n metaTitle\n metaDescription\n }\n }\n', | ||
] | ||
@@ -29,0 +29,0 @@ )) |
@@ -1,2 +0,2 @@ | ||
import { Collection } from '../generated/graphql'; | ||
import { Collection, ProductFieldsFragment } from '../generated/graphql'; | ||
import { CalculatedProduct } from './product.util'; | ||
@@ -7,6 +7,6 @@ /** | ||
export declare function getSeoDescription( | ||
description: string | ||
description?: string | ||
): string | undefined; | ||
export declare function getMetaInfo( | ||
item?: CalculatedProduct | Collection, | ||
item?: CalculatedProduct | Collection | ProductFieldsFragment, | ||
url?: string, | ||
@@ -13,0 +13,0 @@ type?: 'product' | 'article' | 'blog' | 'website' |
@@ -30,2 +30,3 @@ 'use strict'; | ||
function getMetaInfo(item, url, type) { | ||
var _a, _b; | ||
if (type === void 0) { | ||
@@ -37,7 +38,10 @@ type = 'product'; | ||
} | ||
var seoDescription = ( | ||
item === null || item === void 0 ? void 0 : item.description | ||
) | ||
? getSeoDescription(item.description) | ||
: undefined; | ||
var seoDescription = | ||
((_a = item.customFields) === null || _a === void 0 | ||
? void 0 | ||
: _a.metaDescription) || getSeoDescription(item.description); | ||
var title = | ||
((_b = item.customFields) === null || _b === void 0 | ||
? void 0 | ||
: _b.metaTitle) || item.name; | ||
var image = item.featuredAsset ? item.featuredAsset.preview : undefined; | ||
@@ -65,6 +69,7 @@ var script = []; | ||
return { | ||
title: (item === null || item === void 0 ? void 0 : item.name) || item.slug, | ||
title: title || item.slug, | ||
meta: [ | ||
{ key: 'title', name: 'title', content: title || item.slug }, | ||
{ key: 'description', name: 'description', content: seoDescription }, | ||
{ key: 'og:title', name: 'og:title', content: item.name }, | ||
{ key: 'og:title', name: 'og:title', content: title }, | ||
{ | ||
@@ -71,0 +76,0 @@ key: 'og:description', |
@@ -39,6 +39,6 @@ 'use strict'; | ||
[ | ||
'\n fragment ProductFields on Product {\n id\n name\n slug\n assets {\n preview\n thumbnail\n }\n featuredAsset {\n id\n preview\n thumbnail\n }\n description\n variants {\n id\n name\n priceWithTax\n productId\n stockLevel\n options {\n id\n name\n group {\n id\n name\n }\n }\n assets {\n id\n preview\n thumbnail\n }\n featuredAsset {\n id\n preview\n thumbnail\n }\n }\n }\n', | ||
'\n fragment ProductFields on Product {\n id\n name\n slug\n assets {\n preview\n thumbnail\n }\n featuredAsset {\n id\n preview\n thumbnail\n }\n description\n variants {\n id\n name\n priceWithTax\n productId\n stockLevel\n options {\n id\n name\n group {\n id\n name\n }\n }\n assets {\n id\n preview\n thumbnail\n }\n featuredAsset {\n id\n preview\n thumbnail\n }\n }\n customFields {\n metaTitle\n metaDescription\n }\n }\n', | ||
], | ||
[ | ||
'\n fragment ProductFields on Product {\n id\n name\n slug\n assets {\n preview\n thumbnail\n }\n featuredAsset {\n id\n preview\n thumbnail\n }\n description\n variants {\n id\n name\n priceWithTax\n productId\n stockLevel\n options {\n id\n name\n group {\n id\n name\n }\n }\n assets {\n id\n preview\n thumbnail\n }\n featuredAsset {\n id\n preview\n thumbnail\n }\n }\n }\n', | ||
'\n fragment ProductFields on Product {\n id\n name\n slug\n assets {\n preview\n thumbnail\n }\n featuredAsset {\n id\n preview\n thumbnail\n }\n description\n variants {\n id\n name\n priceWithTax\n productId\n stockLevel\n options {\n id\n name\n group {\n id\n name\n }\n }\n assets {\n id\n preview\n thumbnail\n }\n featuredAsset {\n id\n preview\n thumbnail\n }\n }\n customFields {\n metaTitle\n metaDescription\n }\n }\n', | ||
] | ||
@@ -45,0 +45,0 @@ )) |
{ | ||
"name": "pinelab-storefront-client", | ||
"version": "0.48.0", | ||
"version": "0.49.0", | ||
"description": "Generates static html pages with Gridsome and suplied Vue components", | ||
@@ -50,3 +50,3 @@ "author": "Martijn van de Brug <martijn@pinelab.studio>", | ||
}, | ||
"gitHead": "73459cd97679c0d417daac13ad3c0a6cbbe1a5d8" | ||
"gitHead": "12891d9329dc7436824e89db189a931b8f5b2cf9" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
636888
8170