-
-
Notifications
You must be signed in to change notification settings - Fork 229
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: grapher page related research from DB content graph (#3176)
This PR replaces the fortunejs content graph with a DB-based alternative, using the links stored in the `posts_links` and `posts_gdoc_links` tables. ![Screenshot 2024-02-07 at 10.54.47.png](https://graphite-user-uploaded-assets-prod.s3.amazonaws.com/0SFFiIjKuUK6UPYHVe6u/8f7371fb-0e80-4d07-8a4e-4fc4c8002c59.png) This PR also continues the deprecation work started in #3166. - [x] fully rebake site on staging - [x] fixed malformed prominent link in content (ourworldindata.org/ instead of https://ourworldindata.org/) - [x] https://owid.cloud/wp/wp-admin/post.php?post=34103&action=edit - [x] https://owid.cloud/wp/wp-admin/post.php?post=34066&action=edit **Inconsistency on how grapher chart links are stored in the DB**: there are a handful of chart links stored with the https://ourworldindata.org/grapher prefix. These disappear upon saving the containing articles, which indicates that they were created with an older version of the codebase. I'm then opting for not supporting them in the content graph. ```sql SELECT pgl.*, pg.published from posts_gdocs_links pgl JOIN posts_gdocs pg on pg.id = pgl.sourceId WHERE pgl.target LIKE "https://ourworldindata.org/grapher%" ``` ### Testing links Below are some testing links to grapher pages, backlinking to posts in different configurations. - gdoc: https://ourworldindata.org/grapher/agricultural-export-subsidies - [x] http://localhost:3030/grapher/agricultural-export-subsidies - [x] http://staging-site-db-content-graph/grapher/agricultural-export-subsidies - gdocs: https://ourworldindata.org/grapher/pollution-deaths-from-fossil-fuels - [x] http://localhost:3030/grapher/pollution-deaths-from-fossil-fuels - [x] http://staging-site-db-content-graph/grapher/pollution-deaths-from-fossil-fuels - wp: https://ourworldindata.org/grapher/dalys-rate-from-all-causes - [x] http://localhost:3030/grapher/dalys-rate-from-all-causes - [x] http://staging-site-db-content-graph/grapher/dalys-rate-from-all-causes - wp (with chart redirect): https://ourworldindata.org/grapher/age-standardized-death-rate-from-pm25-pollution-per-100000-vs-gdp-per-capita-int- - [x] http://localhost:3030/grapher/age-standardized-death-rate-from-pm25-pollution-per-100000-vs-gdp-per-capita-int- - [x] http://staging-site-db-content-graph/grapher/age-standardized-death-rate-from-pm25-pollution-per-100000-vs-gdp-per-capita-int- - gdoc (with chart redirect): https://ourworldindata.org/grapher/population-long-run-with-projections?time=earliest..2100&country=~OWID_WRL - [x] http://localhost:3030/grapher/population-long-run-with-projections?time=earliest..2100&country=~OWID_WRL - [x] http://staging-site-db-content-graph/grapher/population-long-run-with-projections?time=earliest..2100&country=~OWID_WRL - none: https://ourworldindata.org/grapher/death-rates-alcohol-drug-overdoses-by-age-who - [x] http://localhost:3030/grapher/death-rates-alcohol-drug-overdoses-by-age-who - [x] http://staging-site-db-content-graph/grapher/death-rates-alcohol-drug-overdoses-by-age-who
- Loading branch information
Showing
17 changed files
with
323 additions
and
1,004 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.