Skip to main content
View plugin on GitHub
See starters using this

The Gatsby courses theme

A Gatsby theme for creating courses.

Usage

Theme options

Key Default value Description
basePath / Root url for all courses
contentPath content/courses Location of courses and lessons
assetPath content/assets Location of assets
mdx true Configure gatsby-plugin-mdx (if your website already is using the plugin pass false to turn this off)

Inside content/courses create a folder for a course. In this folder create index.mdx. This file defines the course, the rest of the files are the lessons.

Example usage

// gatsby-config.js
module.exports = {
  plugins: [
    {
      resolve: `gatsby-theme-courses`,
      options: {
        // basePath defaults to `/`
        basePath: `/`,
      },
    },
  ],
}

Additional configuration

In addition to the theme options, there are a handful of items you can customize via the siteMetadata object in your site’s gatsby-config.js

// gatsby-config.js
module.exports = {
  siteMetadata: {
    // Used for the site title and SEO
    title: `My Blog Title`,
    // Used to provide alt text for your avatar
    author: `My Name`,
    // Used for SEO
    description: `My site description...`,
    // Used for social links in the root footer
    social: [
      {
        name: `Twitter`,
        url: `https://twitter.com/gatsbyjs`,
      },
      {
        name: `GitHub`,
        url: `https://github.com/gatsbyjs`,
      },
    ],
  },
}

Docs
Tutorials
Plugins
Blog
Showcase