This repository was archived by the owner on Sep 16, 2024. It is now read-only.
File tree 5 files changed +74
-62
lines changed
5 files changed +74
-62
lines changed Original file line number Diff line number Diff line change @@ -63,7 +63,10 @@ export const SEO: React.FC<React.PropsWithChildren<SEOProps>> = ({
63
63
< meta name = "msapplication-TileColor" content = "#0f172a" />
64
64
{ noIndex && < meta name = "robots" content = "noindex, nofollow" /> }
65
65
{ breadcrumbListItems . length >= 1 && (
66
- < script type = "application/ld+json" > { JSON . stringify ( breadcrumbList ( breadcrumbListItems ) ) } </ script >
66
+ < script
67
+ type = "application/ld+json"
68
+ dangerouslySetInnerHTML = { { __html : JSON . stringify ( breadcrumbList ( breadcrumbListItems ) ) } }
69
+ />
67
70
) }
68
71
{ children }
69
72
</ >
Original file line number Diff line number Diff line change @@ -326,7 +326,7 @@ export default Index
326
326
327
327
export const Head = ( ) => (
328
328
< SEO >
329
- < script type = "application/ld+json" > { JSON . stringify ( homepage ) } </ script >
329
+ < script type = "application/ld+json" dangerouslySetInnerHTML = { { __html : JSON . stringify ( homepage ) } } / >
330
330
</ SEO >
331
331
)
332
332
Original file line number Diff line number Diff line change @@ -167,26 +167,29 @@ export const Head: HeadFC<DataProps> = ({ data: { garden } }) => (
167
167
< meta name = "twitter:data2" value = { garden . icon } />
168
168
< meta name = "article:published_time" content = { garden . seoDate } />
169
169
< meta name = "article:modified_time" content = { garden . seoLastUpdated } />
170
- < script type = "application/ld+json" >
171
- { JSON . stringify (
172
- article ( {
173
- isGarden : true ,
174
- post : {
175
- title : garden . title ,
176
- description : garden . excerpt ,
177
- slug : garden . slug ,
178
- image : `/social/digital-garden.png` ,
179
- date : garden . seoDate ,
180
- lastUpdated : garden . seoLastUpdated ,
181
- year : garden . yearDate ,
182
- } ,
183
- category : {
184
- name : `Digital Garden` ,
185
- slug : `/garden` ,
186
- } ,
187
- } )
188
- ) }
189
- </ script >
170
+ < script
171
+ type = "application/ld+json"
172
+ dangerouslySetInnerHTML = { {
173
+ __html : JSON . stringify (
174
+ article ( {
175
+ isGarden : true ,
176
+ post : {
177
+ title : garden . title ,
178
+ description : garden . excerpt ,
179
+ slug : garden . slug ,
180
+ image : `/social/digital-garden.png` ,
181
+ date : garden . seoDate ,
182
+ lastUpdated : garden . seoLastUpdated ,
183
+ year : garden . yearDate ,
184
+ } ,
185
+ category : {
186
+ name : `Digital Garden` ,
187
+ slug : `/garden` ,
188
+ } ,
189
+ } )
190
+ ) ,
191
+ } }
192
+ />
190
193
</ SEO >
191
194
)
192
195
Original file line number Diff line number Diff line change @@ -40,26 +40,29 @@ export const Head: HeadFC<WritingViewDataProps> = ({ data: { post } }) => (
40
40
< meta name = "twitter:data2" value = { post . category . name } />
41
41
< meta name = "article:published_time" content = { post . seoDate } />
42
42
< meta name = "article:modified_time" content = { post . seoLastUpdated } />
43
- < script type = "application/ld+json" >
44
- { JSON . stringify (
45
- article ( {
46
- isGarden : false ,
47
- post : {
48
- title : post . title ,
49
- description : post . description ? post . description : post . excerpt ,
50
- date : post . seoDate ,
51
- lastUpdated : post . seoLastUpdated ,
52
- year : post . yearDate ,
53
- image : post . image ,
54
- slug : post . slug ,
55
- } ,
56
- category : {
57
- name : post . category . name ,
58
- slug : post . category . slug ,
59
- } ,
60
- } )
61
- ) }
62
- </ script >
43
+ < script
44
+ type = "application/ld+json"
45
+ dangerouslySetInnerHTML = { {
46
+ __html : JSON . stringify (
47
+ article ( {
48
+ isGarden : false ,
49
+ post : {
50
+ title : post . title ,
51
+ description : post . description ? post . description : post . excerpt ,
52
+ date : post . seoDate ,
53
+ lastUpdated : post . seoLastUpdated ,
54
+ year : post . yearDate ,
55
+ image : post . image ,
56
+ slug : post . slug ,
57
+ } ,
58
+ category : {
59
+ name : post . category . name ,
60
+ slug : post . category . slug ,
61
+ } ,
62
+ } )
63
+ ) ,
64
+ } }
65
+ />
63
66
</ SEO >
64
67
)
65
68
Original file line number Diff line number Diff line change @@ -57,26 +57,29 @@ export const Head: HeadFC<WritingViewDataProps> = ({ data: { post } }) => (
57
57
< meta name = "twitter:data2" value = { post . category . name } />
58
58
< meta name = "article:published_time" content = { post . seoDate } />
59
59
< meta name = "article:modified_time" content = { post . seoLastUpdated } />
60
- < script type = "application/ld+json" >
61
- { JSON . stringify (
62
- article ( {
63
- isGarden : false ,
64
- post : {
65
- title : post . title ,
66
- description : post . description ? post . description : post . excerpt ,
67
- date : post . seoDate ,
68
- lastUpdated : post . seoLastUpdated ,
69
- year : post . yearDate ,
70
- image : post . image ,
71
- slug : post . slug ,
72
- } ,
73
- category : {
74
- name : post . category . name ,
75
- slug : post . category . slug ,
76
- } ,
77
- } )
78
- ) }
79
- </ script >
60
+ < script
61
+ type = "application/ld+json"
62
+ dangerouslySetInnerHTML = { {
63
+ __html : JSON . stringify (
64
+ article ( {
65
+ isGarden : false ,
66
+ post : {
67
+ title : post . title ,
68
+ description : post . description ? post . description : post . excerpt ,
69
+ date : post . seoDate ,
70
+ lastUpdated : post . seoLastUpdated ,
71
+ year : post . yearDate ,
72
+ image : post . image ,
73
+ slug : post . slug ,
74
+ } ,
75
+ category : {
76
+ name : post . category . name ,
77
+ slug : post . category . slug ,
78
+ } ,
79
+ } )
80
+ ) ,
81
+ } }
82
+ />
80
83
</ SEO >
81
84
)
82
85
You can’t perform that action at this time.
0 commit comments