1
1
mirror of https://github.com/jxnblk/mdx-deck.git synced 2024-11-29 13:58:02 +03:00
mdx-deck/packages/gatsby-theme
Brent Jackson 371f6c9cf5 v2.3.1
2019-04-21 18:02:37 -04:00
..
src Refactor gatsby theme layout 2019-04-20 16:21:08 -04:00
.gitignore Ignore 2019-04-10 20:22:57 -04:00
.npmignore Add styles for theme index view 2019-04-10 23:04:25 -04:00
gatsby-browser.js Refactor gatsby theme layout 2019-04-20 16:21:08 -04:00
gatsby-config.js Add mdx option to gatsby theme 2019-04-12 15:42:07 -04:00
gatsby-node.js Add support for single deck in theme 2019-04-11 22:45:56 -04:00
index.js Add noop index 2019-04-11 11:31:11 -04:00
package.json v2.3.1 2019-04-21 18:02:37 -04:00
README.md Add mdx option to gatsby theme 2019-04-12 15:42:07 -04:00

@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