Article (Article, NewsArticle, BlogPosting)
What is article rich result?
Incorporating Article structured data into your news, blog, and sports article pages helps Google better comprehend the content, enhancing title text, images, and date information in Google Search results, Google News, and the Google Assistant.
Kindly Refer Google Doc to know more about article rich result.
What are necessary data for article rich result?
1. Article Type (rjs-article-type
)
article.html
<!-- Article type - Article, NewsArticle, BlogPosting -->
<body class="rjs-article-type" data-articletype="NewsArticle"></body>
2. Published Date (rjs-article-pdt
)
article.html
<p class="rjs-article-pdt">2024-02-06 08:37 PM</p>
3. Modified Date (rjs-article-mdt
)
article.html
<p class="rjs-article-mdt">2024-06-26 05:23 PM</p>
4. Images (rjs-article-img
)
article.html
<!-- Any number of images can be added -->
<img
class="rjs-article-img"
src="https://i.imsur.com/image-1.jpeg"
alt="Example image 1"
/>
<img
class="rjs-article-img"
src="https://i.imsur.com/image-2.jpeg"
alt="Example image 2"
/>
5. Author Name (rjs-article-anameP-*
, rjs-article-anameO-*
)
article.html
<!-- Number suffix helps associate information to an entity -->
<p class="rjs-article-anameP-1">Dr. Phil</p>
<!-- Type: Person -->
<p class="rjs-article-anameO-2">Cresteem</p>
<!-- Type: Organisation -->
<p class="rjs-article-anameP-3">Dr. Bruce</p>
<!-- Type: Person -->
<p class="rjs-article-anameO-4">Stark Industry</p>
<!-- Type: Organisation -->
6. Author URL (rjs-article-aurl-*
)
article.html
<!-- Number suffix helps associate information to an entity -->
<p class="rjs-article-anameP-1">Dr. Phil</p>
<a class="rjs-article-aurl-1" href="https://www.instagram.com/drphil/"
>User Profile</a
>
<p class="rjs-article-anameP-2">Dr. Bruce</p>
<a class="rjs-article-aurl-2" href="https://www.linkedin.com/in/bruce/"
>User Profile</a
>
7. Job Title (rjs-article-ajob-*
)
Optional
article.html
<!-- Number suffix helps associate information to an entity -->
<p class="rjs-article-anameP-1">Dr. Phil</p>
<p class="rjs-article-ajob-1">Dermatologists</p>
<p class="rjs-article-anameP-2">Dr. Bruce</p>
<p class="rjs-article-ajob-2">Anesthesiologists</p>
8. Headline (<title>
)
The
<title>
tag is considered as the headline.article.html
<title>Article Example Page</title>
9. Publisher Name (rjs-article-pname-*
)
article.html
<p class="rjs-article-pname-1">Cresteem</p>
10. Publisher URL (rjs-article-purl-*
)
article.html
<!-- Number suffix helps associate information to an entity -->
<p class="rjs-article-pname-1">Cresteem</p>
<a class="rjs-article-purl-1" href="https://cresteem.com/blogs/"
>Publisher Website</a
>
Function and parameters
đź’ˇ
By default input file is overwriiten with result so
destination
is optionalThis is only for API method.
We prefer CLI method for keeping it simpler (refer - Working with API & CLI).
func_params.js
const richResultType = 'article';
const filePath = 'article.html';
const destination = 'dist/article.html'; /* optional */
richie([richResultType], filePath, destination);
Example of a Instance
article.html
<body data-articletype="NewsArticle">
<!-- article type - Article, NewsArticle, BlogPosting-->
<!-- published date -->
<p class="rjs-article-pdt">2024-02-06 08:37 PM</p>
<!-- modified date -->
<p class="rjs-article-mdt">2024-06-26 05:23 PM</p>
<main>
<!-- thumbnail images or cover images -->
<img
class="rjs-article-img"
src="https://i.imgur.com/X3E4UxT.jpeg"
alt=""
/>
<img
class="rjs-article-img"
src="https://i.imgur.com/pJSzybj.jpeg"
alt=""
/>
<!-- authorname -->
<!-- anameP is Person type -->
<!-- anameO is Organisation type -->
<!-- HonorPrefix supported e.g.: Mr, Mrs, Miss, Ms, Mx, Sir, Dame, Dr, Cllr, Lady, or Lord, or other titles or positions-->
<p class="rjs-article-anameP-1">Dr.Phil</p>
<!-- author profile url -->
<a class="rjs-article-aurl-1" href="https://www.instagram.com/drphil/"
>User Profile</a
>
<!-- author job title - this is optional-->
<p class="rjs-article-ajob-1">Dermatologistsr</p>
<p class="rjs-article-anameO-2">Winchester</p>
<a class="rjs-article-aurl-2" href="https://www.linkedin.com/in/winchester/"
>User Profile</a
>
<p class="rjs-article-pname-1">Cresteem</p>
<a class="rjs-article-purl-1" href="https://cresteem.com/blogs/"></a>
<p class="rjs-article-pname-2">Google</p>
<a class="rjs-article-purl-2" href="https://google.com/blogs/"></a>
</main>
</body>
Output of a Instance
article.html
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "NewsArticle",
"headline": "Article Test Page",
"image": [
"https://i.imgur.com/X3E4UxT.jpeg",
"https://i.imgur.com/pJSzybj.jpeg"
],
"datePublished": "2024-02-06T20:37:00+05:30",
"dateModified": "2024-06-26T17:23:00+05:30",
"author": [
{
"@type": "Person",
"honorificPrefix": "Dr",
"name": "Phil",
"url": "https://www.instagram.com/drphil/",
"jobTitle": "Dermatologists"
},
{
"@type": "Organization",
"name": "Winchester",
"url": "https://www.linkedin.com/in/winchester/"
}
],
"publisher": [
{ "name": "Cresteem", "url": "https://cresteem.com/blogs/" },
{ "name": "Google", "url": "https://google.com/blogs/" }
]
}
</script>
Let’s see what’s next!