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): improve Gatsby Image docs #13170

Merged
merged 10 commits into from
Apr 18, 2019
Merged

fix(docs): improve Gatsby Image docs #13170

merged 10 commits into from
Apr 18, 2019

Conversation

marcysutton
Copy link
Contributor

@marcysutton marcysutton commented Apr 5, 2019

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


Two alternative ways of handling static assets are described in the next sections.

## Querying for a `File` in GraphQL using gatsby-source-filesystem
Copy link
Contributor

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...

@LekoArts LekoArts added the type: documentation An issue or pull request for improving or updating Gatsby's documentation label Apr 15, 2019
@marcysutton marcysutton marked this pull request as ready for review April 15, 2019 23:28
@marcysutton marcysutton requested a review from a team April 15, 2019 23:28
@marcysutton marcysutton requested a review from a team as a code owner April 15, 2019 23:28
@marcysutton marcysutton changed the title WIP: Improve Gatsby Image docs Improve Gatsby Image docs Apr 15, 2019

```js
import { withPrefix } from 'gatsby'

render() {
// Note: this is an escape hatch and should be used sparingly!
Copy link
Contributor

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?

Copy link
Contributor

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"

Copy link
Contributor Author

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)


```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.
Copy link
Contributor

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

Copy link
Contributor Author

@marcysutton marcysutton Apr 16, 2019

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.

Copy link
Contributor

@calcsam calcsam left a 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!

@marcysutton
Copy link
Contributor Author

marcysutton commented Apr 18, 2019

If there aren't any comments on the using-gatsby-image example docs, I think we should merge this in. We can always make improvements later!

@DSchau DSchau changed the title Improve Gatsby Image docs fix(docs): improve Gatsby Image docs Apr 18, 2019
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.

Looks great! Feel free to merge!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: documentation An issue or pull request for improving or updating Gatsby's documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Using Gatsby Image site uses Lorem Ipsum placeholder text Improve gatsby-image docs
5 participants