Like what you see here? Wonder how this site loads so fast? Now you can check out the source code yourself!
Now that we have been using the new site for a while we have found life so much easier using Gatsby and we wanted to share the joy so we decided to open source the code that powers this site.
If you want to see how this site is made go have a look over on our GitHub page: https://github.com/customprogrammingsolutions/CPS_gatsby
If you like what you see please give us a star on the repository!
Why we like this static site approach
We really like static site generators, they are particularly powerful as they let you make static sites that are easy to deploy and easy to optimize for good user experience. For our particular use case there's been a lot of upsides, since we relaunched this site with Gatsby we have spent far less time doing operations related work and the performance of the website is just so much better. We are spending less on hosting and simultaneously are able to serve more pages with less latency. We have also found it very good to have access to all the components in the react.js frontend world, having to use the template systems in Drupal feel very limiting in comparison.
The downside? Static site generators tend to be more complex to set up than some of the other CMS offerings, we had to write some code to make this all work. We feel that by contributing example code we can help people understand the framework better and give context to people wanting to get started with Gatsby. By looking at our repository you can see some ideas for how to structure a Gatsby project.
We wanted to show people how we made this as we think example code from real-world projects is useful to developers considering a new platform or for those weighing up their options for adopting new frameworks/technologies.