mirror of
https://github.com/jxnblk/mdx-deck.git
synced 2024-11-29 13:58:02 +03:00
.. | ||
src | ||
.gitignore | ||
.npmignore | ||
gatsby-browser.js | ||
gatsby-config.js | ||
gatsby-node.js | ||
index.js | ||
package.json | ||
README.md |
@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