We use GitHub to host code, to track issues and feature requests, as well as accept pull requests.
We use the main
branch as the development branch. All PRs should be made to the main
branch from a feature branch. To create a pull request, you can use the following steps:
- Fork the repository and create a new branch from
main
. - Ensure that any text content matches the tone of the rest of the site and is clean
- Follow the "Boy Scout Rule" with code - leave it better than you found it. New code should be well documented.
- Test your changes!
- Provide detail (the what and why) behind your changes and label your pull request with the appropriate labels - for example, a change affecting GitHub actions should have the
actions
label added. - Open your pull request, which will be reviewed. Work through any change requests by the maintainer.
- If approved and merged, congratulations!
Over time, code formatting and linting will be added to the project, and steps & tests will be added accordingly. Similarly, a Pull request template is on the roadmap.
If just contributing text, you may feel more comfortable editing in the GitHub web view. This is perfectly fine, but I strongly encourage learning and exploring something new with setting up the project on your device.
- Install Node.js 20+.
- Clone your fork to your device.
- Run
npm install
from the project root directory - If you don't want to run the data generation scripts locally, skip this step. More notes will be added for this process in the future.
- To read the Google Sheet data locally, you'll need to setup a GCP project, enable the Google Sheets API, and generate a service account.
- Add the service account credential to your env file.
- The Google Sheet id environment variable can be populated by grabbing the portion of the Community Catalog URL after "/d/" and the next slash.
Currently, the database file and produced tile mdx files are saved to the repository to let you skip the steps of generating data, setting up a GCP project, etc. If you are doing data setup or code changes around this, you will want to follow the prereq step. Once setup, run npm run gen:full
which will execute all three generate data scripts. In order, this will:
- create a sqlite database in the
/src/data/
directory, with tables for the tiles and importing tiles. - fetch and parse the Community Catalog data into your database.
- produce the
src/pages/tiles/
content for each tile.
More to come in this section. For now, you should be goog to go - fire up the local server with npm run dev
and have fun!