Lead Developer and Architect:
Mike Riethmuller
https://www.madebymike.com.au
Additional Code:
Joe Hardy
https://joe.hardy.id.au
SydneyMusic.net is a static site that is generated at build time. It has been coded using the following technologies:
... and we're deploying to Netlify and using Contentful as our Headless CMS.
You're welcome to read this code, get inspiration from it, fork it, deploy it or drop a pull request in with some suggestions. We just ask that anything you do be done in the spirit of the community project.
... then please go for it! We are happy to provide what help and support we can but ultimately the code is provided in an "as is" basis and doesn't have any kind of warranty or support commitment attached to it. We're not getting paid for this.
Here are the conditions of use which we request in good faith:
Software pre-requisites that you'll need to have installed on your computer:
You will also need to create a free Contentful account at www.contentful.com. You can replace Contentful with any other GraphQL-compatible datastore for your own site, but start with this.
First, we're going to get Everything In Its Right Place
git clone
.npm install
.contentful/
directory in this repoCongrats, you now have a local development environment and a Headless CMS to store all your data in!
You can verify the content model import worked by navigating around the "Content Model" section in Contentful.
First up, we need to configure your local environment to access your online Contentful data repository
.env
in the root directory of your local copy of the codebase and put two lines representing two environment variables in it:VITE_CONTENTFUL_SPACE=
VITE_CONTENTFUL_TOKEN=
The values for these two environment variables should be the Contentful Space ID and a Contentful Token Access Token (secret key). You can read up how to get these in the Contentful documentation.
Theoretically you should be ready to run your local copy of the site now!
npm run dev
from your codebase directoryYou can deploy this site anywhere you want, but the fastest way to do it is using Netlify. Their free tier offers 300 build minutes per month and 100GB of traffic.
You can sign up for an account at https://www.netlify.com and to get the site deploying you just tell Netlify where your git repository is. Read their docs for more information on that.
NB: we'll probably also provide a method to deploy the site to Amazon Web Services later (S3 + Lambda + Cloudfront) - or ideally some other code-first PaaS that doesn't have a billionaire at the helm - but that'll come down the track.
The site is deployed as a static site. This is important. The site is generated - as in, it downloads all of the content, renders every page, and creates a static site - when you build it. That means that the site itself is not dynamic - everything has already been pre-generated. This is good because it means the site is faster in the browser, and usage is relatively anonymised.
As a result, when you add a new "entry" to Contentful, you will need to issue an instruction to Netlify to trigger a build and deploy of the site. This is done via webhooks, and you can read about them at:
https://www.contentful.com/developers/docs/concepts/webhooks/ https://docs.netlify.com/configure-builds/build-hooks/
You should hopefully have a development environment, a production environment to deploy to, and a CMS to write your content.
From here, use these resources to try and facilitate the growth of your community!