-
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
Simplify using-gatsby-image example #11329
Comments
cc @shannonbux |
It's probably important to coordinate this issue with #9374, which deals with adding a |
I too am struggling with gatsby-image, so this is a great proposal! |
Same here! Trying to get it working for my sister's site, and looking through tons of people's source code hasn't quite helped me find a use case that matches mine (which is pretty simple. I'm just trying to use gatsby-image in my layout.js file to make the logo image load with a nice background color and I'm not really a developer so any amount of complexity in source code means I don't know how to imitate it) Because the gatsby-image example site is so complex, I think it would make sense to clone it and then create a stripped down version, and then rename the complex version. Or perhaps add a simple "practice page" to the site. @fk is the creator so looping him in here. They could be called |
Hey @trepidacious (and everyone)! Thanks for opening this issue and your detailed description! I hear you (and everyone 😉) loud and clear. I agree that @jlengstorf's outline for the potential new part in the tutorial looks great, #9374 (comment), but maybe it's a bit too much to tackle in one go? How about we expand https://www.gatsbyjs.org/docs/using-gatsby-image/#solution to include all necessary steps in the meantime?
|
I'm happy to take this on. I recently wrote up something similar for a blog post, so easy enough to adapt. |
Ugh I can't believe I made that typo. 😭 @lstar19 we’d love to have your help! @marcysutton is there anything to keep in mind here, or is this ready for a PR? |
<!-- Have any questions? Check out the contributing docs at https://gatsby.app/contribute, or ask in this Pull Request and a Gatsby maintainer will be happy to help :) --> ## Description Fix path for gatsby-config, include entire gatsby-config file structure ## Related Issues Addresses #11329
I think this issue can be closed now that #11998 was merged! Please let us know if it could be simplified further. |
Summary
The using-gatsby-image example is complicated and uses multiple features unrelated to gatsby-image. The code related to images is spread across multiple locations. There are few comments.
Basic example
I would suggest that the example is rewritten to:
Motivation
This would help to bring the gatsby-image documentation up to the very high level of the step by step tutorial.
This would provide a minimal example for users who may be struggling with getting gatsby-image to work, that they can then build on with additional features. Each existing example I can find (and it's good that there are a lot) is quite long, covering a wide range of features, and does not include a self-contained, minimal, commented, functional example.
The expected outcome would be that users could completely understand the example, and then copy and paste it to their own project to establish a baseline use of images.
This would be achieved by reducing the amount of cognitive overhead in separating out the parts of the example project that are required for gatsby-image from the 90-95% that is unrelated.
The text was updated successfully, but these errors were encountered: