@mvarble/gatsby-theme-mdx-deck

Add MDX Deck presentations to any Gatsby site

Usage no npm install needed!

<script type="module">
  import mvarbleGatsbyThemeMdxDeck from 'https://cdn.skypack.dev/@mvarble/gatsby-theme-mdx-deck';
</script>

README

gatsby-theme-mdx-deck

Add MDX Deck presentations to any Gatsby site

npm i gatsby-theme-mdx-deck
// gatsby-config.js
module.exports = {
  plugins: [
    'gatsby-theme-mdx-deck',
  ]
}

Add one or more MDX presentation files to the decks/ directory. The filenames will be used for creating routes to each deck.

Example decks/hello.mdx

# Hello!

---

## Beep boop

Layouts

Individual slides can be wrapped with layout components, which work similarly to slide templates found in other presentation software.

Example decks/hello.mdx

import Layout from './my-layout'

<Layout>

# Hello

</Layout>

---

## Beep boop

Configuration Options

The Gatsby theme accepts the following options.

// gatsby-config.js
module.exports = {
  plugins: [
    {
      resolve: 'gatsby-theme-mdx-deck',
      options: {
        // enable or disable gatsby-plugin-mdx
        mdx: false,
        // source directory
        contentPath: 'decks',
        // base path for routes generate by this theme
        basePath: ''
        // passed to the `gatsby-plugin-mdx` config
        mdxOptions: {},
      }
    }
  ]
}

MIT License