This is the repo for the Upgrade King County website
- Node 12.13.0 or higher is required.
- Fork the repo
- Create a branch for your changes
- Submit a pull request
Assuming you've already forked this repository follow these steps to get up and running on your computer.
git clone git@github.com:{your-github-username}/upgradekingcounty.github.io
cd upgradekingcounty.github.io
git checkout -b descriptive-branch-name
npm install
npm start
A good starter post on Next.js + Gatsby + MDX can be found here.
The site uses Gatsby, a React-based static site generator. Learn more about Gatsby here.
We are also using a plugin for using Markdown and React together. You can learn more about it here.
We use Prettier for automatic JavaScript formatting.
Use the npm run format
command to run code formatting or we recommend downloading the
Prettier extension for your editor of
choice to enable features like formatting on save.
As header and footer will be standard across the whole site, if you are working on
content for the site, you can largely just update existing MDX files in the src/pages/
directory.
The header, footer, and other common components should be placed in the
src/components/common
directory. Unlike page content, these are written in JS + CSS.
This repository is configured so that whenever a change is pushed to main
the website
will be entirely built and redeployed. We currently do not have a staging or dev site.
Recommended that if you want those, simply fork the repo and provide a link to your
fork's deployment.
- Fork this repository. Everything below will happen on the fork.
- Turn on GitHub Pages in your fork repo (Settings → Options → GitHub Pages).
- Select branch:
gh-pages
. - Select folder:
/ (root)
. - Enable Actions: click “I understand my workflows, go ahead and enable them” and then turn on workflows.
- Push (or merge) changes to your fork’s
main
branch. - Preview the site at https://<YOUR_NAME>.github.io/upgradekingcounty.github.io/