@mdx-deck/gatsby-theme

2.5.0 • Public • Published

@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 = {
  plugins: ['@mdx-deck/gatsby-theme'],
}

Add MDX Decks to the src/decks/ directory. The filename will be used for the route of that deck.

/src/decks/hello.mdx

# Hello!

---

## Beep

Using Layouts

Slide layout components must be rendered inline, not using the default export syntax.

/src/decks/hello.mdx

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 = {
  plugins: [
    {
      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

Readme

Keywords

none

Package Sidebar

Install

npm i @mdx-deck/gatsby-theme

Weekly Downloads

1

Version

2.5.0

License

MIT

Unpacked Size

10.3 kB

Total Files

13

Last publish

Collaborators

  • jxnblk