graphql.github.io icon indicating copy to clipboard operation
graphql.github.io copied to clipboard

fix: use component path to ensure edit page link works for root/index

Open joshlevinson opened this issue 2 years ago • 1 comments

In 78d6728, onCreatePage was updated to use page.path instead of page.componentPath. page.path is a member of the Page interface; componentPath is not.

The value of page.path for the site home page is /. This means the "Edit Page" link in the Footer has an invalid path: The rendered href is https://github.com/graphql/graphql.github.io/edit/source/../../../.., but a browser follows the parent directory navigation path and leads to https://github.com 😁

page.component is part of the Page interface, and in my local testing/building of the site, seems to generate proper links for all pages...

joshlevinson avatar Sep 21 '23 19:09 joshlevinson

:white_check_mark: graphql.github.io-source deploy preview ready

gatsby-cloud[bot] avatar Sep 21 '23 19:09 gatsby-cloud[bot]

@Urigo this can be closed after Nextra migration

dimaMachina avatar Mar 31 '24 00:03 dimaMachina