@@ -51,12 +51,12 @@ export default (product, variants) => {
51
51
} = product ;
52
52
53
53
const image = findProductImage ( product , variants ) ;
54
-
55
- return /* html */ `\
54
+ return /* html */ `
56
55
<!DOCTYPE html>
57
56
<html>
58
57
<head>
59
58
<title>${ metaTitle || name } </title>
59
+ <meta charset="UTF-8">
60
60
<meta property="description" content="${ metaDescription || description } ">
61
61
<meta property="og:title" content="${ metaTitle || name } ">
62
62
<meta property="og:image" content="${ image ?. url } ">
@@ -68,7 +68,7 @@ export default (product, variants) => {
68
68
<meta name="twitter:card" content="summary_large_image">
69
69
<meta name="twitter:title" content="${ name } ">
70
70
<meta name="twitter:image" content="${ image ?. url } ">
71
- <meta name="twitter:description" content="${ description } ">
71
+ <meta name="twitter:description" content="${ metaDescription || description } ">
72
72
<meta name="twitter:label1" content="Price">
73
73
<meta name="twitter:data1" content="${ prices . final . amount } ">
74
74
<meta name="twitter:label2" content="Availability">
@@ -95,7 +95,7 @@ export default (product, variants) => {
95
95
${ description ? `<p>${ description } </p>` : '' }
96
96
<div class="product-images">
97
97
<div>
98
- ${ images . map ( ( img ) => `\
98
+ ${ images . map ( ( img ) => `
99
99
<div>
100
100
<picture>
101
101
<source type="image/webp" srcset="${ img . url } " alt="" media="(min-width: 600px)">
@@ -108,7 +108,7 @@ ${images.map((img) => `\
108
108
</div>
109
109
110
110
<div class="product-attributes">
111
- ${ attributes . map ( ( attr ) => `\
111
+ ${ attributes . map ( ( attr ) => `
112
112
<div>
113
113
<div>${ attr . name } </div>
114
114
<div>${ attr . label } </div>
@@ -117,7 +117,7 @@ ${attributes.map((attr) => `\
117
117
</div>
118
118
119
119
<div class="product-options">
120
- ${ options . map ( ( opt ) => `\
120
+ ${ options . map ( ( opt ) => `
121
121
<div>
122
122
<div>${ opt . id } </div>
123
123
<div>${ opt . label } </div>
@@ -126,7 +126,7 @@ ${options.map((opt) => `\
126
126
<div>${ opt . multiple ? 'multiple' : '' } </div>
127
127
<div>${ opt . required === true ? 'required' : '' } </div>
128
128
</div>
129
- ${ opt . items . map ( ( item ) => `\
129
+ ${ opt . items . map ( ( item ) => `
130
130
<div>
131
131
<div>option</div>
132
132
<div>${ item . id } </div>
@@ -138,15 +138,15 @@ ${opt.items.map((item) => `\
138
138
</div>
139
139
140
140
<div class="product-variants">
141
- ${ variants . map ( ( v ) => `\
141
+ ${ variants . map ( ( v ) => `
142
142
<div>
143
143
<div>${ v . sku } </div>
144
144
<div>${ v . name } </div>
145
145
<div>${ v . inStock ? 'inStock' : '' } </div>
146
146
<div>Regular: ${ v . prices . regular . amount } ${ v . prices . regular . currency } ${ priceRange ( v . prices . regular . minimumAmount , v . prices . regular . maximumAmount ) } </div>
147
147
<div>Final: ${ v . prices . final . amount } ${ v . prices . final . currency } ${ priceRange ( v . prices . final . minimumAmount , v . prices . final . maximumAmount ) } </div>
148
148
<div>
149
- ${ v . images . map ( ( img ) => `\
149
+ ${ v . images . map ( ( img ) => `
150
150
<picture>
151
151
<source type="image/webp" srcset="${ img . url } " alt="" media="(min-width: 600px)">
152
152
<source type="image/webp" srcset="${ img . url } ">
0 commit comments