1

So far I have been building my website on a localhost.

At some point I had to build an extra page. But then I noticed, while designing on my local host, that the css was not being renderd to that new page (except for the index.html).

So I had to add a / to the path <link href="/css/style.css" rel="stylesheet"> So that the css was shown on my new page & build straight from the root.

Ironically this doesnt work on my local host. Which is a bit annoying, because now I can't design my website on my localhost.

Why is Jekyll acting like this? How can I design locally?

Adress of localhost: http://127.0.0.1:4000/boilerplate/

enter image description here

Link to repo: https://github.com/bomengeduld/boilerplate/tree/gh-pages

JoostS
  • 9,344
  • 3
  • 27
  • 50
  • Possible duplicate of ["New Jekyll Page" not rendering default css.stylesheet : Only index.html works fine](https://stackoverflow.com/questions/47113656/new-jekyll-page-not-rendering-default-css-stylesheet-only-index-html-works-f) – C. Augusto Proiete Nov 06 '17 at 14:12

1 Answers1

1

Your server address should be http://127.0.0.1:4000 without 'boilerplate' (or you should add 'boilerplate' as your baseurl).

JoostS
  • 9,344
  • 3
  • 27
  • 50
  • Or If the OP added new html files in a subdirectory, perhaps `"../css/style.css"` as the url would be better, as it would be compatible with both their localhost and their server setup. – Mr Lister Nov 05 '17 at 08:05
  • 1
    I deleted /boilerplate/ from my baseurl in config.yml. Then I restarted localhost. After that it worked. Sometimes it are silly mistakes. Thank you all for the guidance! – Gino Jan Ludikhuyze Nov 05 '17 at 09:43