Skip to content

Commit 0922e30

Browse files
authored
fix: use meta name for description (#72)
* fix: use meta name for description * chore: fix tests * chore: fix postdeploy test * fix: remove json override
1 parent 19af5dc commit 0922e30

File tree

4 files changed

+2
-32
lines changed

4 files changed

+2
-32
lines changed

src/templates/html/HTMLTemplate.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ export class HTMLTemplate {
8585
<meta charset="UTF-8">
8686
<title>${product.metaTitle || product.name}</title>
8787
<meta name="viewport" content="width=device-width, initial-scale=1">
88-
${HTMLTemplate.metaProperty('description', product.metaDescription)}
88+
${HTMLTemplate.metaName('description', product.metaDescription)}
8989
${HTMLTemplate.metaName('keywords', product.metaKeyword)}`;
9090
}
9191

src/templates/html/overrides/visual-comfort--adobe-edge.js

-29
This file was deleted.

test/fixtures/post-deploy/bella-tank.html

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
<meta charset="UTF-8">
66
<title>Bella Tank</title>
77
<meta name="viewport" content="width=device-width, initial-scale=1">
8-
<meta property="description" content="">
98

109
<meta property="og:title" content="Bella Tank">
1110
<meta property="og:type" content="product">

test/templates/html/index.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ describe('Render Product HTML', () => {
5454
});
5555

5656
it('should have the correct meta description', () => {
57-
const metaDescription = document.querySelector('meta[property="description"]');
57+
const metaDescription = document.querySelector('meta[name="description"]');
5858
const expectedDescription = product.metaDescription;
5959
assert.strictEqual(metaDescription.getAttribute('content'), expectedDescription, 'Meta description does not match expected value');
6060
});

0 commit comments

Comments
 (0)