Skip to content

Commit 22a911b

Browse files
wmui51Wilbert Muisherakama
authored
docs: add documentation for endowed positions (#486)
* Docs: Add documentation for endowed positions updates. --------- Co-authored-by: Wilbert Mui <wilbert.mui@unitedmasters.com> Co-authored-by: Sherakama <sheamck@stanford.edu>
1 parent 57ed4a9 commit 22a911b

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

endowed-positions.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Endowed Positions
2+
3+
Endowed Positions is a subsection of the Stanford Giving site.
4+
5+
The main route `/endowed-positions` is a page built via Storyblok. The sub-routes are built and controlled via Gatsby. Each school, center, institute, or program has its own sub-route, i.e. `/endowed-positions/graduate-school-of-business`. Schools/centers are added or removed via [ENDOWED_POSITIONS_MAP.json](https://github.com/SU-SWS/ood_giving_site/blob/dev/src/constants/ENDOWED_POSITIONS_MAP.json).
6+
7+
Search results are another sub-route, i.e. `/endowed-positions/search?term=james`. This route will provide a list of results, each of which is clickable. When one of the results is clicked, a query param of the results' index is appended, and the UI is changed to show only that result. There were potential plans to expand this, but this functionality matched that of the previous Endowed Positions site. Search is powered by [Fuse.js](https://www.fusejs.io/).
8+
9+
## Endowed Positions Files
10+
11+
- [React component files](https://github.com/SU-SWS/ood_giving_site/tree/dev/src/components/endowed-positions)
12+
- [Dataset JSON](https://github.com/SU-SWS/ood_giving_site/blob/dev/src/fixtures/endowedPositions.json)
13+
- [School/Center Map JSON](https://github.com/SU-SWS/ood_giving_site/blob/dev/src/constants/ENDOWED_POSITIONS_MAP.json)
14+
15+
## Updating the Endowed Positions dataset
16+
17+
The Endowed Positions dataset is updated about 6 times a year. Every few months, an updated CSV will be provided by the team that manages the data. The site will need the updated data from the CSV. The following are steps to update the site data once a new CSV is received:
18+
19+
1. Convert CSV to JSON using a tool such as ([csvjson](https://csvjson.com/csv2json))
20+
2. Replace the existing data file with the new one, keeping the same name [endowedPositions.json](https://github.com/SU-SWS/ood_giving_site/blob/dev/src/fixtures/endowedPositions.json)
21+
3. Update the footer's dates. The updated date is the day the developer makes the change. ([EndowedPositionsFooter.js](https://github.com/SU-SWS/ood_giving_site/blob/dev/src/components/endowed-positions/EndowedPositionsFooter.js))
22+
4. Once updated, create a pull request and send the preview build URL to the approver [Forrest Glick](https://github.com/forrestglick)
23+
5. When approved, merge into the dev branch and cut a release for production
24+
6. Release to production on the date and time agreed upon with the [approver](https://github.com/forrestglick)
25+
26+
* [Sample PR](https://github.com/SU-SWS/ood_giving_site/pull/484)

0 commit comments

Comments
 (0)