1
1
import getPostTypeStaticPaths from '@/api/wordpress/_global/getPostTypeStaticPaths'
2
2
import getPostTypeStaticProps from '@/api/wordpress/_global/getPostTypeStaticProps'
3
3
import Layout from '@/components/common/Layout'
4
- import { Info } from '@/components/molecules/Alert'
5
4
import { BlogJsonLd , NextSeo } from 'next-seo'
6
5
import Link from 'next/link'
7
6
import PropTypes from 'prop-types'
@@ -21,37 +20,28 @@ export default function BlogPost({post, posts, archive}) {
21
20
// TODO create generic archive component and move this check to `_app.js`.
22
21
if ( archive ) {
23
22
return (
24
- < Layout title = "Blog" >
25
- < NextSeo
26
- title = "Query from Yoast SEO"
27
- description = "Query from Yoast SEO"
28
- openGraph = { {
29
- title : 'Query from Yoast SEO' ,
30
- description : 'Query from Yoast SEO' ,
31
- images : [
32
- {
33
- url : 'Query from Yoast SEO' ,
34
- alt : 'Query from Yoast SEO'
35
- }
36
- ]
37
- } }
38
- />
39
- < BlogJsonLd
40
- url = "Query from Yoast SEO"
41
- title = "Query from Yoast SEO"
42
- images = { [ 'Query from Yoast SEO' ] }
43
- datePublished = "Query from Yoast SEO"
44
- dateModified = "Query from Yoast SEO"
45
- authorName = "Jane Blogs"
46
- description = "Query from Yoast SEO"
47
- />
23
+ < Layout >
48
24
< div className = "container" >
49
25
< section >
50
26
{ ! posts || ! posts . length ? (
51
27
< p > No posts found.</ p >
52
28
) : (
53
29
posts . map ( ( post , index ) => (
54
30
< >
31
+ < NextSeo
32
+ title = "Query from Yoast SEO"
33
+ description = "Query from Yoast SEO"
34
+ openGraph = { {
35
+ title : 'Query from Yoast SEO' ,
36
+ description : 'Query from Yoast SEO' ,
37
+ images : [
38
+ {
39
+ url : 'Query from Yoast SEO' ,
40
+ alt : 'Query from Yoast SEO'
41
+ }
42
+ ]
43
+ } }
44
+ />
55
45
< article key = { index } >
56
46
< Link href = { post . uri } >
57
47
< a >
@@ -71,15 +61,31 @@ export default function BlogPost({post, posts, archive}) {
71
61
}
72
62
73
63
return (
74
- < Layout title = { post ?. title } description = { post ?. excerpt } >
64
+ < Layout >
65
+ < NextSeo
66
+ title = "Query from Yoast SEO"
67
+ description = "Query from Yoast SEO"
68
+ openGraph = { {
69
+ title : 'Query from Yoast SEO' ,
70
+ description : 'Query from Yoast SEO' ,
71
+ images : [
72
+ {
73
+ url : 'Query from Yoast SEO' ,
74
+ alt : 'Query from Yoast SEO'
75
+ }
76
+ ]
77
+ } }
78
+ />
79
+ < BlogJsonLd
80
+ url = "Query from Yoast SEO"
81
+ title = "Query from Yoast SEO"
82
+ images = { [ 'Query from Yoast SEO' ] }
83
+ datePublished = "Query from Yoast SEO"
84
+ dateModified = "Query from Yoast SEO"
85
+ authorName = "Query from Yoast SEO"
86
+ description = "Query from Yoast SEO"
87
+ />
75
88
< div className = "container" >
76
- < Info >
77
- The content below is sourced from the WordPress REST-API.{ ' ' }
78
- < a href = "https://nextjs.org/docs/basic-features/data-fetching#getstaticpaths-static-generation" >
79
- Learn more about SSG.
80
- </ a >
81
- </ Info >
82
-
83
89
< section >
84
90
< article >
85
91
< h1 dangerouslySetInnerHTML = { { __html : post ?. title } } />
0 commit comments