Skip to content

ChristopherBiscardi/gatsby-theme-minimal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

The smallest possible Gatsby theme

Quick Start

mkdir my-site
cd my-site
yarn init
# install gatsby-theme-minimal and it's dependencies
yarn add gatsby react react-dom gatsby-theme-minimal

Then add the theme to your gatsby-config.js. We'll use the long form here for education purposes.

module.exports = {
  __experimentalThemes: [
    {
      resolve: "gatsby-theme-minimal",
      options: {}
    }
  ]
};

That's it, you can now run your gatsby site using

yarn gatsby develop

Note that this site doesn't do anything, so you're see a missing resources error. Create a simple page in src/pages/index.js to see a page on the root url.

import React from "react";

export default () => <div>My Site!</div>;

Doing more with themes

You can use this as a place to start when developing themes. I generally suggest using yarn workspaces like the gatsby-theme-examples repo does, but using yarn link or npm link is a viable alternative if you're not familiar with workspaces.

git clone [email protected]:ChristopherBiscardi/gatsby-theme-minimal.git
git clone [email protected]:ChristopherBiscardi/gatsby-theme-minimal-example.git
cd gatsby-theme-minimal
yarn link
cd ../gatsby-theme-minimal-example
yarn
yarn link gatsby-theme-minimal

Then run yarn gatsby develop and start making changes to your theme!

About

The smallest possible gatsby theme. It does nothing. Example usage at https://github.com/ChristopherBiscardi/gatsby-theme-minimal-example

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published