Migrate to Netlify Today

Netlify announces the next evolution of Gatsby Cloud. Learn more

ContactSign Up
Community Plugin
View plugin on GitHub

Deck ‘n’ Blog

You write the MDX for your mdx-decks, and this Gatsby theme creates the deck and the blog post for you.

Installation

To use this theme in your Gatsby sites, follow these instructions:

  1. Init your Gatsby site (skip this if you already have a site)

    npx gatsby new my-gatsby-site https://github.com/gatsbyjs/gatsby-starter-default
    cd my-gatsby-site
  2. Install the theme

    npm install --save gatsby-theme-deck-n-blog
  3. Add the theme to your gatsby-config.js:

    module.exports = {
      plugins: ["gatsby-theme-deck-n-blog"],
    }
  4. Create a deck in decks/my-deck.mdx

    ---
    title: The Restaurant
    date: 1980-10-12
    ---
    
    import { Intro, Content } from "gatsby-theme-deck-n-blog"
    
    <Intro>
    
    This will only appear in the blog post as an intro an as the excerpt.
    
    </Intro>
    
    # Slide 1
    
    <Content>
    
    This will appear in the blog post together with the slide 1
    
    </Content>
    
    ---
    
    # Slide 2
    
    <Content>
    
    This will appear in the blog post together with the slide 2
    
    </Content>
  5. Start your site

    npm run start
© 2023 Gatsby, Inc.