Coder Social home page Coder Social logo

gatsby-theme-mdx-deck's Introduction

@philpl/gatsby-theme-mdx-deck

This is a modified version of gatsby-theme-mdx-deck. It makes a couple of small changes on top of the default theme:

  • Fix split-slides.js for some custom JSX
  • Add support for inline SVG
  • Remove print support
  • Add theme.size.{width.height} to replace theme.aspectRatio

The theme.size values are used to create fixed size slides. Every slide will have a fixed pixel size of that exact value (by default 1366x768px) and will be scaled to fit in the current viewport. This makes it easier to position and scale things consistently on each slide.

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: ''
      }
    }
  ]
}

MIT License

gatsby-theme-mdx-deck's People

Contributors

kitten avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

madalynrose

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.