Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using a git repo to keep other gatsby sites in sync

Tags:

git

gatsby

I've got a gatsbyjs starter that I created to maintain my blog, I never really planned on making it reusable, however, my wife and a friend of mine have both asked if I can make them a blog using my starter.

Is there a way I can use a git repo as a 'base' image and then use it as a dependency or something so that if I make updates to the base image, my wife and mate can both just merge those changes into their blog repos?

I was hoping that updates would be a part of the gatsby starter config but if it is I can't see anything. Making the starter an NPM package crossed my mind too but there are only parts that should be automatically updated and others that should not, plus npm doesn't really feel like the right choice as it's effectively a full site template rather than just a package.

Any suggestions?

like image 869
Alex Foxleigh Avatar asked Sep 20 '25 19:09

Alex Foxleigh


1 Answers

A fairly recent answer to this is Gatsby themes:

  • https://www.gatsbyjs.org/docs/themes/what-are-gatsby-themes/
  • https://www.gatsbyjs.org/blog/2019-07-03-announcing-stable-release-gatsby-themes/

They should let you build your version of the starter as a theme package that can be installed by other people, rather than having to fork your starter (which is more of a one-time operation as you and that first link both note).

like image 179
kennethormandy Avatar answered Sep 22 '25 15:09

kennethormandy