mirror of
https://github.com/jxnblk/mdx-deck.git
synced 2024-12-01 21:42:08 +03:00
1.1 KiB
1.1 KiB
@mdx-deck/gatsby-theme
WIP A Gatsby theme for adding MDX Decks to your Gatsby site
npm i @mdx-deck/gatsby-theme
Note: This theme requires MDX v1 and will not work with previous versions of MDX
// gatsby-config.js
module.exports = {
__experimentalThemes: ['@mdx-deck/gatsby-theme'],
}
Add MDX Decks to the src/decks/
directory.
# Hello!
---
## Beep
Using Layouts
Slide layout components must be rendered inline, not using the default export syntax.
import Layout from './my-layout'
<Layout>
# Hello Layout
</Layout>
Theme Config
The following options can be passed to the gatsby theme.
// gatsby-config.js
module.exports = {
__experimentalThemes: [
{
resolve: '@mdx-deck/gatsby-theme',
options: {
// disable gatsby-mdx plugin – use this when your site already uses gatsby-mdx
mdx: false,
// source directory for decks
path: 'src/presentations',
// name routes' basepath
name: 'presentations',
},
},
],
}
MIT License