File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed
packages/smooth-plugin-head-meta/src Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,12 @@ export const typeDefs = gql`
11
11
content: String @field(label: "Content")
12
12
}
13
13
14
+ type HreflangLink {
15
+ rel: String @field(label: "rel")
16
+ href: String @field(label: "href")
17
+ hreflang: String @field(label: "hreflang")
18
+ }
19
+
14
20
type HeadMeta {
15
21
title: String @field(label: "Title")
16
22
description: String @field(label: "Description")
@@ -27,5 +33,6 @@ export const typeDefs = gql`
27
33
twitterDescription: String @field(label: "Twitter description")
28
34
twitterImage: Image @field(label: "Twitter image")
29
35
customMetas: [CustomMeta] @field(label: "Custom metadatas")
36
+ hreflangLinks: [HreflangLink] @field(label: "hreflang links")
30
37
}
31
38
`
Original file line number Diff line number Diff line change @@ -37,6 +37,15 @@ function HeadMeta({ headMeta }) {
37
37
headMeta . customMetas . map ( ( meta , index ) => (
38
38
< meta key = { index } name = { meta . name } content = { meta . content } />
39
39
) ) }
40
+ { headMeta . hreflangLinks &&
41
+ headMeta . hreflangLinks . map ( ( link , index ) => (
42
+ < link
43
+ key = { index }
44
+ rel = { link . rel }
45
+ href = { link . href }
46
+ hrefLang = { link . hreflang }
47
+ />
48
+ ) ) }
40
49
</ Helmet >
41
50
)
42
51
}
@@ -73,6 +82,11 @@ headMeta {
73
82
name
74
83
content
75
84
}
85
+ hreflangLinks {
86
+ rel
87
+ href
88
+ hreflang
89
+ }
76
90
}
77
91
` ,
78
92
]
You can’t perform that action at this time.
0 commit comments