Ayrton Senna
Ayrton Senna

Reputation: 3835

CSS/images not being loaded in Jekyll blog

I am new to Jekyll and just trying to start a Jekyll Theme example. I tried a few other themes too and all of them only load up at port 4000 with basic text and no images/styling.

The server starts and I can look at the page but it is very ugly without the styling.

I know I can change the variables and configurations but I just wanted to run this as it is first. I can see all the images and in the images folder but why is this not being loaded on the blog?

I am new to Jekyll so please let me know if there is something wrong with this. Jekyll serve is the correct way to start the server right?

Upvotes: 2

Views: 3079

Answers (2)

Jonathan
Jonathan

Reputation: 11494

For me the problem was the baseurl: "/" instead of "" which broke my paths. So that's worth checking. The current answer lead me in the right direction to check my _config.yml but url: was not the problem.

Upvotes: 1

RobertKenny
RobertKenny

Reputation: 3596

Have you updated the URL in _config.yml? This is used to build the links to the CSS and scripts.

When working locally you should comment it out. If you haven't already open _config.yml and change

url:              http://your-site.com

to

#url:              http://your-site.com

When you publish to a live site uncomment the line and update the url.

Upvotes: 13

Related Questions