Image not rendering but renders locally? #22777
-
Hello! I’m Robyn and I’m a student of web development and Git is something I am working hard to learn/get proficient with. I just uploaded a new repo (simple advice page). My CSS wasn’t working, but I seem to have fixed that although I still don’t know why it wasn’t showing up. My file structure and file paths in my html are all working fine locally, but were not on gitpages. I cannot get my image to load on my published page. Can someone help me with this please? Here’s the link: https://robynljackson.github.io/robyns-advice/robyn-j-advice.html **Correction: I THOUGHT I fixed the css issue. It’s not working either. Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments
-
Hey @RobynLJackson, welcome to the GitHub Support Community! It looks like you’ve already managed to fix this by updating your asset links to use relative links to your repository instead of using absolute, local links to your files on disk. Feel free to drop another message or open a new thread if you need help with anything else! |
Beta Was this translation helpful? Give feedback.
-
Hello @thomasshaped! I appreciate your time and help. I’m glad to have the links update confirmed, however, the page is not displaying (a 404 error). I’m wondering at this point if it’s because there is an index.html and an advice.html page (the 2nd page which should open with the link from the index.html)? I still think it’s a file structure issue, but can’t figure out what the solution is yet. Can you help please? Here’s the link to the advice.html that should come up on gitpages: [https://robynljackson.github.io/robyns-advice/advice/robyn-j-advice.html]. I’m working hard to learn git and become proficient at it. Hosting this simple site should be something I know how to do without a problem. I appreciate any help you can provide! |
Beta Was this translation helpful? Give feedback.
-
It looks like you’ve got an extra
Robyn's Advice For NewbiesAlternatively, if you want the |
Beta Was this translation helpful? Give feedback.
-
Greetings @thomasshaped. Thank you for leading me through my tangle of file path and file structure errors. I updated the link as you pointed out. Changes have not updated (or worked) yet. I see/get that the file structure of the directory is sloppy and that’s a problem with hierarchy and page loading. Thank you for clarifying the issues for me! |
Beta Was this translation helpful? Give feedback.
-
Hi again @thomasshaped. At the command line I rm the index.html, renamed the advice.html to index.html. My local directory and the repo is up to date. I pushed these changes to “git push origin gh-pages”. Is there something else I need to do to push these changes to my hosted page? How do I delete the index.html file in the main branch of my repo so I can merge the two branches? Thank you! |
Beta Was this translation helpful? Give feedback.
-
@thomasshaped Thank you for your time and serious patience! |
Beta Was this translation helpful? Give feedback.
@thomasshaped
I resolved it and my git pages link works perfectly. I made all the changes in VSC and the command line.
Thank you for your time and serious patience!
[robyns-advice]
(https://robynljackson.github.io/robyns-advice/)