Git Product home page Git Product logo

themes-example's Introduction

Gatsby Themes Example

This is an example of how Gatsby would implement an architecture where multiple teams can independently build and deploy portions of a website. With the power of gatsby-themes it's possible to accomplish this.

In this example, I'm using a Monorepo to link all packages together. When a company needs to have an indepenent release process where deploys need to go through Q&A and such, this use case would use at least two independent repositories. The first contains the main website (company.com) and the second contains all packages that are owned by the individual teams.

Splitting the package monorepo into smaller chunks is also possibl and will depend on how you want to your teams to work.

Intro

In this example there are three sections:

  • company.com
  • design-system
  • company-themes

company.com

This will be the main website that will be built on gatsbyjs.com and be deployed on every change. We'll have an atomic deployment of all parts of the site. Every release, the team will need to bump package.json to get the correct version of their theme. This allows upgrading each section at a time or all at once.

Design system

A React package that contains building blocks that's used by multiple teams to create their layouts. This

company-themes

This is a collection of plugins that are owned by a team inside company. A theme is a gatsby mini-site that can run on its own. It can contain plugins, pages, .... In the end, everything is stitched together by the company.com package.

In the demo, the @company/product (company-themes/company-product) package contains the product detail page. The @company/category (company-themes/company-category) package contains the category page. They both use company-plugin-sourcing to get the relavant GraphQL data.

How to run the demo

Install all dependencies

yarn

Run the site

yarn develop

themes-example's People

Contributors

glitton avatar wardpeet avatar

Watchers

James Cloos avatar  avatar

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.