-
Select Topic AreaQuestion BodyHello everybody! This is my first time in the community. My question involves more than Pages so I may do some errors but I'll try to be clear and let me know if I should redirect my question. Recently in GitHub, I've been trying to upload files I've been working on in Visual Studio Code. This is for a Coursera course on doing a first basic website. I've been adding images, links, text, and everything to make sure I was meeting all the requirements of the project. Once I completed that, I was ready to host my site. I created a repository with my name, uploaded some html files including the project one, and I set all the necessary settings including making my site live and deploying from a main branch with docs. ![]() ![]() My files took one or two days to finally work. The main site is not the READMe one with the "Hi there" words https://apamanes.github.io/apamanes/ , but the Final Project one(I tried renaming it to Index because I thought it'd be easier for GitHub). All other files did work as well once you copy the address https://apamanes.github.io/apamanes/myFirstPage.html. However, in the project link the images are still not showing. I found this videohttps://www.youtube.com/watch?v=K942H-5MW4w&t=836s to solve that issue. Before continuing, I realized that the the guy in the video had a function in VsCode that changes made there could be automatically done in GitHub. This could have saved me time as I don't need to make individual changes to both GitHub and VsCode. So, I saw a feature in VsCode to connect to GitHub (I didn't take a screenshot), and after hitting commit, all my files automatically were loading to something. I put my GitHub username and email in the terminal as required, but my files were taking so long that I cancelled them. Now all my files are either green or yellow as staged or modified, and it also created a new repository in GitHub but with no files. I guess my question is... what should be the best way to make the images be seen? Should I put the images folder in GitHub, or find an extension to make my work in VScode be in Sync with Git Hub and follow a more ordered process? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
Hey @apamanes, I had a look at your repo and screenshot. Since you renamed
After that, give it a few minutes to update, then refresh your site link. If you still see the README page, it’s likely caching - try a hard refresh or open it in an incognito window. Looks like you’re on the right track - once those settings line up, your site should load the HTML file properly. |
Beta Was this translation helpful? Give feedback.
-
Check image paths |
Beta Was this translation helpful? Give feedback.
-
Checked your site: https://apamanes.github.io/apamanes/. Issues and fixes1) Images not showingReason: the From: <img src="/Users/apamanes/Desktop/ImagesWebsite/Winton.jpeg"> To: <img src="images/Winton.jpeg" alt="Winton"> 2) Opening other pagesLink to other HTML files with normal anchor tags: <a href="myFirstPage.html">Go to My First Page</a>
<a href="indexAlex.html">Visit Alex's Page</a>
<a href="mySecondNewPage.html">Check Second Page</a> Or open directly in the browser:
3) GitHub Pages index fileGitHub Pages serves Hope this clears your doubt. If you still face any issue, ask here - the community is ready to help. |
Beta Was this translation helpful? Give feedback.
@apamanes
Checked your site: https://apamanes.github.io/apamanes/.
The main page loads and your HTML content is visible.
Issues and fixes
1) Images not showing
Reason: the
images/
folder is not in your repository.Fix: upload the image files into the repo (create an
images
folder) and use relative paths in your HTML.From:
To:
2) Opening other pages
Link to other HTML files with normal anchor tags:
Or open directly in the browser: