2

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.

  • Fork the project.
  • Clone the repo in my local machine
  • bundle install
  • jekyll serve

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?

Ayrton Senna
  • 3,735
  • 5
  • 34
  • 52

2 Answers2

13

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.

RobertKenny
  • 3,556
  • 2
  • 19
  • 17
  • Excellent. Just tried it out. That was exactly the problem. I did not know that the url was used to build the links. Thanks a lot! – Ayrton Senna Aug 13 '13 at 11:40
1

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.

Jonathan
  • 10,936
  • 8
  • 64
  • 79