Skip to content

smashgg/developer-portal

Repository files navigation

start.gg Developer Portal

A place for developers interested in start.gg's API

How do I contribute documentation?

Great question!

  1. Fork/checkout this repo.
  2. Add your .md file in the correct place in the /docs directory
  3. Add the path to your doc file in website/sidebars.json
  4. Open a pull request with these changes and wait for approval :)

Super Quick Tips re: Docs

Here are some quick tips for your docs!

  1. Make sure to use H2's as these are used for page nav
  2. If you are linking to an external page (ie not on developer.start.gg/*) please have these open in a new tab using <a href="https://external-site.example" target="_blank">Hyperlink text</a>
  3. If you are linking to a page within developer.start.gg, please link it as [hyperlink text](/page) instead of [hyperlink text](https://developer.start.gg/page)
  4. Try to keep your characters per line to around 80. This helps prevent merge conflicts and is generally better for version control.

For those of you using Visual Studio Code, there are two recommended extensions:

Updating the Community Projects list (/projects)

The /projects page is generated from the Community API Projects Google Sheet. You do not need a pull request to update it — just edit the sheet and trigger a rebuild.

How it works: website/fetch-projects.js reads the sheet and writes website/data/projects.js. It runs automatically as the prebuild step, so every production build refreshes the list from the sheet. If the fetch fails (missing key, API error, empty result) the build keeps the last committed data/projects.js, so a bad build never takes the site down.

To publish sheet edits:

  1. Edit the Google Sheet.
  2. Trigger a Netlify rebuild (see below). The next build pulls the latest data.

One-time Netlify setup

  1. Add the API key (Site configuration → Environment variables): SHEETS_API_KEY = a Google Cloud API key with the Google Sheets API enabled and read access to the sheet. (Restrict the key by API + optionally by referrer.)
  2. Create a Build Hook (Site configuration → Build & deploy → Build hooks). POST to that URL — or bookmark and open it — to rebuild on demand after editing the sheet.
  3. (Optional) Auto-refresh on a schedule: ping the Build Hook from any cron (e.g. a GitHub Actions scheduled workflow) so sheet edits go live automatically, e.g. nightly.

Refreshing locally

cd website
SHEETS_API_KEY=your_key yarn build      # prebuild fetches fresh data, then builds
# or just regenerate data/projects.js without building:
SHEETS_API_KEY=your_key yarn fetch-projects

Without SHEETS_API_KEY, builds still work and simply use the committed data.

About

A place for developers interested in smash.gg's API

Resources

License

Stars

53 stars

Watchers

9 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors