Css.main showing 404

Hi,

I have hosted the Jekyll blog on Githib, but it seems that my main.css file is throwing up a 404 error. Here is the link to my blog : https://23ruchil.github.io/Blog/

Request you to help me out.

very common, your site is being served as a project, which is really a sub folder under your user name. You are currently trying to reference the css without the correct path - it should be /Blog/assets/main.css but you are using Project/assets/main.css

you should be using baseurl in the config file, and that should be set to your project name which is Blog so like baseurl: /Blog

it looks like you may have put project as your baseurl?

Indeed. The baseurl part above is right

In the site content you have to prepend baseurl . The jekyll preferred way is:

{{ '/assets/main.css' | relative_url }}

Which will give /Blog/assets/main.css

Thanks a ton! . The above suggestion worked!

1 Like