To export your deck as a static HTML page with JS bundle,
add a build
script to your package.json
file.
"scripts": {
"build": "mdx-deck build deck.mdx"
}
Presentations can be exported as PDF using the CLI. This works well as a backup option for any unforeseen technical difficulties.
"script": {
"pdf": "mdx-deck pdf deck.mdx"
}
A PNG image of the first slide can be exported with the screenshot
command.
This is useful for creating open graph images for Twitter, Facebook, or Slack.
"script": {
"screenshot": "mdx-deck screenshot deck.mdx"
}
To use the image as an open graph image, use the Head component to add a meta tag. Note that the meta tag should point to a full URL, including schema and domain name.
import { Head } from 'mdx-deck'
<Head>
<meta name='og:image' content='https://example.com/card.png' />
</Head>