-
Notifications
You must be signed in to change notification settings - Fork 6
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
feat: more debugging features #151
Comments
Hi @calebfaruki, thanks for opening this issue 🙌 I appreciate the critique here, and I can understand your frustration. I just wondered if you had any concrete suggestions for (1) to improve its intuitiveness? For (2), I'm not quite fully understanding your suggestion, could you please elaborate on it? |
For point one, there should be better documentation. The examples are okay. But it's better to know what each field is doing and how to determine what value to put there. ---
templateKey: category-page
path: /path/to/page
title: My Category Page
heroImage:
imageKey: MyImage.jpg # https://myhost.imgix.net/MyImage.jpg
# fieldName value will be inserted by gatsby config.
# Will have return value of GatsbyImageLike (see Typescript definition)
---
Here's my raw text Corresponding gatsby configuration for custom field. {
// get the __typename value from parent node where the imgix data will be nested.
nodeType: 'MarkdownRemarkFrontmatterHeroImage',
// what is the adjacent field/resolver for creating referencing the image asset at the URL.
getURL: (node) => node.imageKey,
// this is the name of the field that is created within the parent node specified in nodeType
fieldName: 'imgixImage',
}, Regarding point number two, the best fundamental thing would be for the getURL error to give expected versus actual output. If it errs on a markdown content entry, it should say what the value is, which piece of content it failed on, and what it would expect the result to look like. An example accompanying the expected data type would also help contextualize the hint.
|
Thanks for the extra suggestions here @calebfaruki! I will raise this with my team and see if we can prioritise updating these. Of course, a PR here is also welcome and I will be prompt with reviews and feedback. Let me know if this is something you are interested in. |
Hey @calebfaruki, I wanted to take a second to follow up on this. We agree it would be nice to have better-debugging features but don't have the bandwidth to tackle this just yet. I'm going to leave this issue open and in the meantime encourage folks who are interested in seeing this added to comment and react on this post. This will help us prioritize this work next time we review outstanding tasks. As always, a PR is also welcome and we'll be sure to provide guidance and feedback. Thanks again for opening this issue and we'll comment on this issue whenever there's been a change in status. |
Two things:
The text was updated successfully, but these errors were encountered: