Image doesn't show up on my github pages site in .md


#1

So i have deployed my website https://funeoz.github.io/techlovers/
But the images don’t show up. But when i preview my posts in markdown on GitHub ,
the images show up https://github.com/Funeoz/techlovers/blob/gh-pages/_posts/Linux/2018-09-15-Installer-Metasploitable-2.md.


#2

your path is not correct, you are using a project so when GH hosts the site the project name is part of the path and that is not included in your url.

People usually use the baseurl variable in the config file when using a project - so you would do:

baseurl: /techlovers

in the config file, and then anywhere you need to reference an asset you do:

{{site.baseurl}}/assets/myfile.png

You can also just change each manually and add /techlovers. But if you ever change the project name all your urls will break.

If you use the console in your browser it will show you all the 404 urls.


#3

Thank you. I already messed up with Jekyll and GitHub Pages by changing the name of the repository but now I know what to do.