Your site is built on Docusaurus v3.10.1. You have Open Graph and Twitter meta tags, but zero JSON-LD structured data. Here is exactly what is missing and the ready-to-paste fix.
What You Are Missing and Why It Hurts
Google Search has two ways to understand your article: meta tags (you have these) and JSON-LD schema (you do not have this). Without JSON-LD, Google cannot show:
Author byline in search results
Publication date
Article rich snippets
Sitelinks for your blog in branded searches
The Fix - Docusaurus Swizzle Approach
Since you are on Docusaurus, you cannot edit individual HTML files. You need to inject JSON-LD via a custom BlogPostPage component or a global script. Here is the cleanest method.
Step 1: Create this file in your repo
Path: src/theme/BlogPostPage/index.js
`
import React from 'react';
import BlogPostPage from '@theme-original/BlogPostPage';
export default function BlogPostPageWrapper(props) {
const { content } = props;
const { metadata } = content;
const schema = {
"@context": "https://schema.org",
"@type": "BlogPosting",
"headline": metadata.title,
"description": metadata.description,
"datePublished": metadata.date,
"dateModified": metadata.lastUpdatedAt || metadata.date,
"url": metadata.permalink
? https://www.recodehive.com${metadata.permalink}
: "https://www.recodehive.com/blog",
"author": {
"@type": "Person",
"name": metadata.authors?.[0]?.name || "Sanjay Viswanathan",
"url": "https://www.sanjaykv.com"
},
"publisher": {
"@type": "Organization",
"name": "RecodeHive",
"url": "https://www.recodehive.com",
"logo": {
"@type": "ImageObject",
"url": "https://www.recodehive.com/img/logo.png"
}
},
"image": metadata.frontMatter?.image || "https://www.recodehive.com/img/og-image.png",
"mainEntityOfPage": {
"@type": "WebPage",
"@id": metadata.permalink
? https://www.recodehive.com${metadata.permalink}
: "https://www.recodehive.com/blog"
}
};
return (
<>
<script
type="application/ld+json"
dangerouslySetInnerHTML={{ __html: JSON.stringify(schema) }}
/>
<BlogPostPage {...props} />
</>
);
}
`
Step 2: Verify it worked
After deploying, go to Google's Rich Results Test:
https://search.google.com/test/rich-results
Paste your blog URL. You should see "Article" detected with author, date, and publisher populated.
While you are in the code, your meta-article:author is set to www.sanjaykv.com (a URL, not a name). That is malformed. The author meta tag should be a person's name, not a URL. Fix it in your docusaurus.config.js blog plugin config or in each post's frontmatter:
yaml
`
authors:
`
Your site is built on Docusaurus v3.10.1. You have Open Graph and Twitter meta tags, but zero JSON-LD structured data. Here is exactly what is missing and the ready-to-paste fix.
What You Are Missing and Why It Hurts
Google Search has two ways to understand your article: meta tags (you have these) and JSON-LD schema (you do not have this). Without JSON-LD, Google cannot show:
Author byline in search results
Publication date
Article rich snippets
Sitelinks for your blog in branded searches
The Fix - Docusaurus Swizzle Approach
Since you are on Docusaurus, you cannot edit individual HTML files. You need to inject JSON-LD via a custom BlogPostPage component or a global script. Here is the cleanest method.
Step 1: Create this file in your repo
Path: src/theme/BlogPostPage/index.js
`
import React from 'react';
import BlogPostPage from '@theme-original/BlogPostPage';
export default function BlogPostPageWrapper(props) {
const { content } = props;
const { metadata } = content;
const schema = {
"@context": "https://schema.org",
"@type": "BlogPosting",
"headline": metadata.title,
"description": metadata.description,
"datePublished": metadata.date,
"dateModified": metadata.lastUpdatedAt || metadata.date,
"url": metadata.permalink
?
https://www.recodehive.com${metadata.permalink}: "https://www.recodehive.com/blog",
"author": {
"@type": "Person",
"name": metadata.authors?.[0]?.name || "Sanjay Viswanathan",
"url": "https://www.sanjaykv.com"
},
"publisher": {
"@type": "Organization",
"name": "RecodeHive",
"url": "https://www.recodehive.com",
"logo": {
"@type": "ImageObject",
"url": "https://www.recodehive.com/img/logo.png"
}
},
"image": metadata.frontMatter?.image || "https://www.recodehive.com/img/og-image.png",
"mainEntityOfPage": {
"@type": "WebPage",
"@id": metadata.permalink
?
https://www.recodehive.com${metadata.permalink}: "https://www.recodehive.com/blog"
}
};
return (
<>
<script
type="application/ld+json"
dangerouslySetInnerHTML={{ __html: JSON.stringify(schema) }}
/>
<BlogPostPage {...props} />
</>
);
}
`
Step 2: Verify it worked
After deploying, go to Google's Rich Results Test:
https://search.google.com/test/rich-results
Paste your blog URL. You should see "Article" detected with author, date, and publisher populated.
While you are in the code, your meta-article:author is set to www.sanjaykv.com (a URL, not a name). That is malformed. The author meta tag should be a person's name, not a URL. Fix it in your docusaurus.config.js blog plugin config or in each post's frontmatter:
yaml
`
authors:
url: https://www.sanjaykv.com
image_url: https://avatars.githubusercontent.com/u/30715153?v=4
`