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

fix(docs): add example for pageContext usage within a page #11580

Merged
merged 3 commits into from
Feb 5, 2019

Conversation

guayom
Copy link
Contributor

@guayom guayom commented Feb 5, 2019

Description

This page explains very well that you can pass context to a page automatically created, but it's missing an example of how to use it in a page via pageContext. I think it is important to explicitly explain it because the name of the variable is different to the prop name.
I added an example.

Related Issues

I didn't find any related issues.

This page explains very well that you can pass `context` to a page automatically created, but it's missing an example of how to use it in a page via `pageContext`. I think it is important to explicitly explain it because the name of the variable is different to the prop name.
I didn't find any related issues.
@guayom guayom requested a review from a team February 5, 2019 22:17
Co-Authored-By: guayom <guayo.mena@gmail.com>
@guayom
Copy link
Contributor Author

guayom commented Feb 5, 2019

Oops, missed the jsx... Do I need to squash?

@DSchau
Copy link
Contributor

DSchau commented Feb 5, 2019

@guayom no need! If you're able, can you fix the linter? In the root of your repo, should be

npx prettier --write docs/docs/creating-and-modifying-pages.md

@guayom
Copy link
Contributor Author

guayom commented Feb 5, 2019

:S Sorry, I didn't understand that part. Should I modify a file or run that command?

Copy link
Contributor

@DSchau DSchau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed it for you! Thanks for the PR 🎉

@DSchau DSchau changed the title Add example for pageContext usage within a page fix(docs): add example for pageContext usage within a page Feb 5, 2019
@DSchau DSchau merged commit c2ffc07 into gatsbyjs:master Feb 5, 2019
@gatsbot
Copy link

gatsbot bot commented Feb 5, 2019

Holy buckets, @guayom — we just merged your PR to Gatsby! 💪💜

Gatsby is built by awesome people like you. Let us say “thanks” in two ways:

  1. We’d like to send you some Gatsby swag. As a token of our appreciation, you can go to the Gatsby Swag Store and log in with your GitHub account to get a coupon code good for one free piece of swag. (Currently we’ve got a couple t-shirts available, plus some socks that are really razzing our berries right now.)
  2. We just invited you to join the Gatsby organization on GitHub. This will add you to our team of maintainers. Accept the invite by visiting https://github.com/orgs/gatsbyjs/invitation. By joining the team, you’ll be able to label issues, review pull requests, and merge approved pull requests.

If there’s anything we can do to help, please don’t hesitate to reach out to us: tweet at @gatsbyjs and we’ll come a-runnin’.

Thanks again!

@guayom
Copy link
Contributor Author

guayom commented Feb 5, 2019

Oh! Gotcha! I did the change from the UI, but now I see that the next time it's best to download the repo and run the linter before commiting. Thanks for your help and for working on this amazing software!

@DSchau
Copy link
Contributor

DSchau commented Feb 5, 2019

Now you helped too :) Thanks for your help, we appreciate it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants