How to add Twitter card image to individual documentation page?

Viewed 119

Is it possible to add a Twitter card image to the individual documentation page? I know that I can use Meta image in docusaurus.config.js but this is a site-wide setting.

1 Answers

You can use the front matter at the top of each .md page to add metadata, as well as the image that will be used in the Twitter card.

---
title: Page Title
description: Page description
slug: page-slug
tags:
  [
    some, tags
  ]
image: https://i.imgur.com/mErPwqL.png
---

# Page Title

Hello world 
Related