Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md #4

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Yet for another alternative, a more user-friendly version, you can browse the [D

This API leverages [GitHub Pages](https://pages.github.com/) for hosting, and [GitHub Actions](https://github.com/features/actions) for automatic syncing its contents with the source of truth that lives in the [Digital Public Goods repository](https://github.com/DPGAlliance/publicgoods-candidates).

Because of the structure imposed by **GitHub Pages**, all the JSON files are stored inside the `docs/` folder, and served from there. The files for each individual endpoint (e.g. `dpg/{dpg}/` and `nominee/{nominee}/`) are pregenerated and stored in correspondingly-named folders with a `index.json` file inside through [this script](https://github.com/DPGAlliance/publicgoods-candidates/blob/master/scripts/api.js), which is triggred to run automatically anytime new relevant changes are pushed to the `master` branch of the [DPGAlliance/publicgoods-candidates repo](https://github.com/DPGAlliance/publicgoods-candidates). This folder and file structure accomplishes making the API available in the static infrastructure that GitHub Pages provides.
Because of the structure imposed by **GitHub Pages**, all the JSON files are stored inside the `docs/` folder, and served from there. The files for each individual endpoint (e.g. `dpg/{dpg}/` and `nominee/{nominee}/`) are pregenerated and stored in correspondingly-named folders with a `index.json` file inside through [this script](https://github.com/DPGAlliance/publicgoods-candidates/blob/master/scripts/api.js), which is triggered to run automatically anytime new relevant changes are pushed to the `master` branch of the [DPGAlliance/publicgoods-candidates repo](https://github.com/DPGAlliance/publicgoods-candidates). This folder and file structure accomplishes making the API available in the static infrastructure that GitHub Pages provides.

⚠️ Please note the trailing `/` at the end of all endpoints, which is an artifact of this setup. If you do not include it, you need your code to follow automatic redirects. Any endpoint without trailing slash returns a `301` redirect to the same path with a trailing slash.

Expand Down