I created a page for my band in the last few days and wanted to publish it to Github pages. I’ve done it bevore and didn’t run into any problems.
I followed the guide for hosting on Github Pages and everything seemed to work before. I’m not the best at programming etc. so it is possible that i’ve overlooked something really simple but I’m at my wits end.
The problems i’ve run into are:
Image and CSS rendering. Images and some stuff that worked locally on my machine are not displaying right. For example, images not showing up. Especially in the header or in the gallery. And posts showing way to much and breaking the visual structure of the site.
The site doesn’t work anymore on my local machine. It gives me the 404 Error page.
All i’ve done is push to Github and adding a workflow. I checked the image links, but they seem to be correct.
A bit more detail would have been helpful – not everybody is aware that your “gallery” is accessed using the “Fotos” menu. And I don’t see any errors with the images in the header, but then you don’t say what you expect there.
Now, if you open “Fotos - Dekadenz Diarrhö”, you see these errors in the browser’s developer console (and you’d probably see them, too):
It’s all about how you reference your images in “infos/fotos.md”. I’m not sure about the correct way to specify the img URL in your case, but I’d try to use a relative URL instead of an absolute one. That’s what you do with your thumbnail in the posts.
Sorry, forgot about the language change. Will try to keep that in mind in the future!
Very weird. In a different project the paths referred automatically to the static folder and worked fine. Seems i have to reference the repo folder in this one.
Thank you very much it worked to some extend! I think I can fix it now.
Static gets copied to your public directory (eg “static/img” ends up in “public/img”). But your images are elsewhere. You’ll find lots of threads here concerning similar issues (“My images/CSS/whatever work fine locally but not in deployment”).