aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2022-01-19 13:56:34 +0100
committerArmand Philippot <git@armandphilippot.com>2022-01-19 14:22:28 +0100
commita26b775b7bbf1abd3e99c8bf9ce4c7522d3a0adc (patch)
tree7f041845fa64d00f20f949d1cba14fec3eca3435 /src/utils
parent813084fc23113ae2f594bf6ef1cf53bd003c9479 (diff)
chore: add structured data using schema.org and JSON-LD
I also added the featured image on single article.
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/helpers/format.ts2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/utils/helpers/format.ts b/src/utils/helpers/format.ts
index b79daef..374df76 100644
--- a/src/utils/helpers/format.ts
+++ b/src/utils/helpers/format.ts
@@ -223,6 +223,7 @@ export const getFormattedPost = (rawPost: RawArticle): Article => {
contentParts,
databaseId,
date,
+ featuredImage,
id,
modified,
seo,
@@ -247,6 +248,7 @@ export const getFormattedPost = (rawPost: RawArticle): Article => {
content: contentParts.afterMore,
databaseId,
dates,
+ featuredImage: featuredImage ? featuredImage.node : null,
id,
intro: contentParts.beforeMore,
seo,