Reputation: 371
I locally made a jekyll site which works perfectly. Now that I uploaded it to github it suddenly doesn't use any scss of mine anymore. In my wrapper.html layout (which I use a layout for the other layouts) I have included:
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<link rel="stylesheet" href="{{ '/assets/css/main.css' | absolute_url }}" >
in assets/css/main.css is:
---
---
@import "stylesheet";
And _stylesheet.scss is in _sass/_stylesheet.scss. Let me know if more information is needed! What is going wrong here? Thanks in advance!
Upvotes: 1
Views: 193
Reputation: 12600
With Jekyll the two main problems for beginners are:
This problem is clearly the latter. Github Pages requires a baseurl, so you cannot link to the domain root. Therefore the starting slash is incorrect. This should work:
<link rel="stylesheet" href="{{ '/assets/css/main.css' | prepend: site.baseurl }}" >
More info for Jekyll beginners can be found in this Jekyll Conference talk.
Upvotes: 1