Skip to content
This repository was archived by the owner on Feb 27, 2024. It is now read-only.

Commit e54fb90

Browse files
committed
add <NextSeo /> and <BlogJsonLd /> components
1 parent 053fe8b commit e54fb90

File tree

1 file changed

+27
-3
lines changed

1 file changed

+27
-3
lines changed

pages/posts/[[...slug]].js

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
import Layout from '@/components/common/Layout'
2-
import {Info} from '@/components/molecules/Alert'
3-
import PropTypes from 'prop-types'
41
import getPostTypeStaticPaths from '@/api/wordpress/_global/getPostTypeStaticPaths'
52
import getPostTypeStaticProps from '@/api/wordpress/_global/getPostTypeStaticProps'
3+
import Layout from '@/components/common/Layout'
4+
import {Info} from '@/components/molecules/Alert'
5+
import {BlogJsonLd, NextSeo} from 'next-seo'
66
import Link from 'next/link'
7+
import PropTypes from 'prop-types'
78

89
// Define route post type.
910
const postType = 'post'
@@ -21,6 +22,29 @@ export default function BlogPost({post, posts, archive}) {
2122
if (archive) {
2223
return (
2324
<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+
/>
2448
<div className="container">
2549
<section>
2650
{!posts || !posts.length ? (

0 commit comments

Comments
 (0)