-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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): improve Gatsby Image docs #13170
Conversation
|
||
Two alternative ways of handling static assets are described in the next sections. | ||
|
||
## Querying for a `File` in GraphQL using gatsby-source-filesystem |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe add a link to package gatsby-source-filesystem in the following paragraph...
this doc seems covered by other docs
|
||
```js | ||
import { withPrefix } from 'gatsby' | ||
|
||
render() { | ||
// Note: this is an escape hatch and should be used sparingly! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ist this note still valid?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or why we describing an escape hatch instead of an "normal import"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The language here is subjective, I chose to keep it in to describe it as something you should try to avoid rather than painting imports as "more normal" (normal usually isn't the correct word, as it means something different to everyone)
docs/docs/static-folder.md
Outdated
|
||
```js | ||
import { withPrefix } from 'gatsby' | ||
|
||
render() { | ||
// Note: this is an escape hatch and should be used sparingly! | ||
// Normally we recommend using `import` for getting asset URLs | ||
// as described in the “Adding Images, Fonts, and Files” page. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I remember this page removed by this pull request? Should we add an link to an replacing page in normal text
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which page? I updated the comment to reflect the new page title. There are already links to it on this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great! The Images, fonts, and files page has long been one of those pages that's added a ton of useful information in a not-very-easy-to-understand format and this cleans it up nicely!
If there aren't any comments on the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Feel free to merge!
Description
As part of the Learning workflow project, this PR introduces some changes to the Gatsby Image docs to make them more clear and easier to follow.
Related Issues
Closes #4319
Closes #12947