If you’re looking for some help, it’s important to provide as much context as possible so that people are able to assist you. Try to always mention:
What’s your URL? This is the easiest way for others to debug your issue redstern.com
What version of Ghost are you using? 2.20
What configuration? Gatsby+Netlify+Headless Ghost
What browser? Chrome
What errors or information do you see in the console?
What steps could someone else take to reproduce the issue you’re having?
After setting up gatsby and ghost per the directions…the cover set image on my ghost admin domain does not appear in the gatsby site. In fact no photo shows up.
I’m completely new to react/front-end so I’m assuming it’s a config somewhere that I need to set.
I have a custom favicon (not the ghost) that I set up in admin. It doesn’t update. I don’t see it in the layout of the starter repo.
Similarly the cover_image is not in the default gatsby ghost repository.
I’ve started work to update the container to have a background image. But I’m not a react dev, so it’s trial and error. The cover image, is the beginning of my updates to the starter repo. I updated src/components/common/Layout.js to:
You can reference the site.icon from your Ghost installation. However, there is a limitation at the moment which doesn’t allow this icon to be used for other plugins. There’s an open issue here, that describes the problem more in-depth. For now, I recommend to copy the favicon from your Ghost installation and replace it with the one in Gatsby.
This should be done with CSS in your starter repository. I recommend checking out which styles are applied in the Casper theme and then adapting them in your Gatsby code.
So you are saying that I can’t add a cover image in my ghost admin instance and have it move automatically to gatsby, without basically creating my own new theme?
I have been trying to do just that for 3 days. It’s a steep learning curve.
Are there any --even rough drafts – of how to place the site.cover_image into the header on the gatbsy theme? It seems like it would be straight forward. I have seen examples of it working for others, but mine doesn’t work.
I tried to use the background-image: url({{img_url background size='xl'}});
I tried adding it and adding inline absolute (image) & relative (container) It just moves everything around
I tried adding the image to the site-banner (it makes the container huge)
I tried adding the css from the Casper theme --and now netlify won’t compile
This is absolutely not what I’m saying. What I said was this:
Your code example was correct - excepts that you put it already in a container that has a limited width, so it can’t be full width - and when I checked your site the first time, I was able to see the cover_image. It was just lacking some CSS styling. You can’t just copy the Casper styles as Casper is using CSS with pre-processors, but the CSS in Casper should give you the idea of what you need to change in Gatsby to make it look similar.
To give you a starting point, don’t insert the image with an HTML tag, but rather as a CSS background image (which is exactly how it’s done in Casper).
First, create a variable to determine the styles (just under facebookUrl get declared in Layout.js: