Skip to content

openscript-ch/gatsby-starter-dogmatism

Repository files navigation

Gatsby Starter Dogmatism

This is a quite opinionated Gatsby starter based on Gatsby's default starter. It features:

When I used Gatsby for the first time, it wasn't difficult to getting started. What puzzled me is how to structure and organize the project with all it's components and other bits neatly. The main reason I've created this starter, to provide an example how to structure a Gatsby website.

Getting started

  1. Use Gatsbys CLI gatsby new my-new-fancy-website https://github.com/openscript-ch/gatsby-starter-dogmatism or click Use this template on the repository page to get a copy.
  2. Open the new project with Visual Studio Code and Remote Containers.
  3. Install the projects dependencies with yarn install.
  4. Run the project with yarn develop.
  5. Configure the Github repository to make automated deployment to Github Pages work:
    1. Got to Settings > Actions > General > Workflow permissions and activate Read and write permissions.

Configuration

  • gatsby-config.ts:

    • siteMetadata.title: Set the websites title
  • Environment variables:

    • PATH_PREFIX: Adds a prefix to all paths. This is useful if you host this project on a subpath like https://example.github.io/gatsby-starter-dogmatism.