diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..0ace1b6 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,43 @@ +# Contributing + +## We Develop with GitHub + +We use GitHub to host code, to track issues and feature requests, as well as accept pull requests. + +## Branch Flow + +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: + +1. Fork the repository and create a new branch from `main`. +2. Ensure that any text content matches the tone of the rest of the site and is clean +3. Follow the "Boy Scout Rule" with code - leave it better than you found it. New code should be well documented. +4. Test your changes! +5. 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. +6. Open your pull request, which will be reviewed. Work through any change requests by the maintainer. +7. 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. + +## How To Get Started + +### Prerequisites +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+](https://nodejs.org/en/download/). +- 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. + +### Data Setup (Optional) + +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: +1. create a sqlite database in the `/src/data/` directory, with tables for the tiles and importing tiles. +2. fetch and parse the Community Catalog data into your database. +3. produce the `src/pages/tiles/` content for each tile. + +### General + +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! diff --git a/package.json b/package.json index 19ce696..3476a5b 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,8 @@ "gen:mdx": "node ./src/data/generateMdxFiles.js", "gen:data": "node ./src/data/updateTiles.js", "gen:db": "node ./src/data/setupDb.js", - "build:full": "npm run gen:db && gen:data && run gen:mdx && next build", + "gen:full": "npm run gen:db && gen:data && run gen:mdx", + "build:full": "npm run gen:full && next build", "build": "next build", "dev": "next", "start": "next start" diff --git a/src/components/HorizontalGrid.js b/src/components/HorizontalGrid.js index 97cb47d..6b87e43 100644 --- a/src/components/HorizontalGrid.js +++ b/src/components/HorizontalGrid.js @@ -1,7 +1,6 @@ -// components/HorizontalGrid.js - import React from "react"; +// might trash this or hg2, todo land on one component const HorizontalGrid = ({ items }) => { return (
*/} - MIT {new Date().getFullYear()} © Hextraction Catalog + MIT {new Date().getFullYear()} © Hextraction Catalog, a project by cadeluca {/*
*/} {/*