Skip to content

Commit fd2412e

Browse files
committed
chore: Adds image and address country attr
1 parent 45750d6 commit fd2412e

File tree

4 files changed

+56
-7
lines changed

4 files changed

+56
-7
lines changed

packages/core/cms/faststore/content-types.json

+28
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,29 @@
129129
"description": "A logo that is representative of your organization. Image guidelines: https://developers.google.com/search/docs/appearance/structured-data/organization",
130130
"type": "string"
131131
},
132+
"image": {
133+
"title": "Organization image/logo object",
134+
"description": "An image that is representative of your organization. Image guidelines: https://developers.google.com/search/docs/appearance/structured-data/organization",
135+
"required": ["url"],
136+
"type": "object",
137+
"properties": {
138+
"url": {
139+
"title": "Organization image URL",
140+
"description": "The URL of the image. Make sure the url is crawlable and indexable.",
141+
"type": "string"
142+
},
143+
"caption": {
144+
"title": "Organization image caption",
145+
"description": "A short description of the image.",
146+
"type": "string"
147+
},
148+
"id": {
149+
"title": "Organization image ID",
150+
"description": "A unique identifier for the image. E.g.: #logo",
151+
"type": "string"
152+
}
153+
}
154+
},
132155
"email": {
133156
"title": "Organization email",
134157
"description": "The email address to contact your business",
@@ -154,6 +177,11 @@
154177
"description": "The city of your postal address.",
155178
"type": "string"
156179
},
180+
"addressCountry": {
181+
"title": "Country",
182+
"description": "The country of your postal address. Recommended to be in 2-letter ISO 3166-1 alpha-2 format, for example 'BR','US'.",
183+
"type": "string"
184+
},
157185
"postalCode": {
158186
"title": "Postal Code",
159187
"type": "string"

packages/core/discovery.config.default.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,11 @@ module.exports = {
2525
'https://www.instagram.com/vtex',
2626
],
2727
logo: 'https://vtex.com/_next/static/media/vtex-logo.80485bcf.svg',
28-
image: 'https://vtex.com/_next/static/media/vtex-logo.80485bcf.svg',
28+
image: {
29+
url: 'https://vtex.com/_next/static/media/vtex-logo.80485bcf.svg',
30+
caption: 'FastStore',
31+
id: '',
32+
},
2933
name: 'VTEX',
3034
legalName: 'VTEX Commerce',
3135
@@ -34,6 +38,7 @@ module.exports = {
3438
streetAddress: 'Rue Improbable 99',
3539
addressLocality: 'Rio de Janeiro',
3640
postalCode: '06473-000',
41+
addressCountry: 'BR',
3742
},
3843
},
3944
plp: {

packages/core/src/pages/index.tsx

+16-5
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,18 @@ function Page({
7272
logo={
7373
settings?.seo?.organization?.logo ?? storeConfig.seo.organization.logo
7474
}
75-
image={
76-
settings?.seo?.organization?.image ??
77-
storeConfig.seo.organization.image
78-
}
75+
image={{
76+
type: 'ImageObject',
77+
url:
78+
settings?.seo?.organization?.image?.url ??
79+
storeConfig.seo.organization.image.url,
80+
caption:
81+
settings?.seo?.organization?.image.caption ??
82+
storeConfig.seo.organization.image.caption,
83+
id:
84+
settings?.seo?.organization?.image?.id ??
85+
storeConfig.seo.organization.image.id,
86+
}}
7987
name={
8088
settings?.seo?.organization?.name ?? storeConfig.seo.organization.name
8189
}
@@ -92,7 +100,7 @@ function Page({
92100
storeConfig.seo.organization.telephone
93101
}
94102
address={{
95-
'@type': 'PostalAddress',
103+
type: 'PostalAddress',
96104
streetAddress:
97105
settings?.seo?.organization?.address?.streetAddress ??
98106
storeConfig.seo.organization.address.streetAddress,
@@ -102,6 +110,9 @@ function Page({
102110
postalCode:
103111
settings?.seo?.organization?.address?.postalCode ??
104112
storeConfig.seo.organization.address.postalCode,
113+
addressCountry:
114+
settings?.seo?.organization?.address?.addressCountry ??
115+
storeConfig.seo.organization.address.addressCountry,
105116
}}
106117
/>
107118

packages/core/src/server/cms/index.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,11 @@ export type PageContentType = ContentData & {
3737
url?: string
3838
sameAs?: string[]
3939
logo?: string
40-
image?: string
40+
image?: {
41+
url: string
42+
caption: string
43+
id: string
44+
}
4145
name: string
4246
legalName?: string
4347
email?: string
@@ -46,6 +50,7 @@ export type PageContentType = ContentData & {
4650
streetAddress?: string
4751
addressLocality?: string
4852
postalCode?: string
53+
addressCountry?: string
4954
}
5055
}
5156
}

0 commit comments

Comments
 (0)