Root stylesheet is set to a non-existant file

Hi there! I am trying to apply site styling using custom.scss file in assets > CSS. When I run bundle exec jekyll serve it says /workspaces/portfolio/assets/css/main.scss 4:9 is the root stylesheet. But I’m not sure that’s correct - I have no such file in that location on my site.

I think what’s supposed to happen is that it sees custom.scss and then makes the necessary imports. Then my site should be styled properly.

Here is the repo if anyone wants to take a look:

I am following this Jekyll portfolio tutorial:

this probably has something to do with the remote theme it looks like you are using.

my guess is that you are NOT supposed to do those imports there - you are probably supposed to just add whatever custom css you want to override the theme css. Try removing the imports and doing something like changing some text to red to see if it works.

Again I am guessing - I don’t use gem themes so not that knowledgeable about them.

Personally I don’t like gem based themes as they are a little opaque as to what is going - ie there is more going on that just what is in your repo as it is using files in a gem for the theme that are not readily visible to you. I think.

I am not able to reproduce the error you mentioned with the given repo. Is the issue fixed ?

Thanks for looking into it. The site is supposed to look as follows with the custom styles applied:

It is a remote theme, but it’s supposed to prefer any local files if you add them.

It doesn’t seem to see the custom.scss file in assets > css.

I followed this article, and just put my custom CSS in assets/css/main.scss. That seems to work, although I don’t see why the file custom.scss doesn’t work.

sure - but you are doing imports from other scss files in that custom file and my guess is it doesn’t like that. Try just putting normal css in that file and I think it would work.

hmmm weird. The strategy I used to update main.scss locally works in codespaces but not when I push it to Github pages.

The thing is I’m following a course and that’s the way they have it setup, so I think I should try to reproduce that functionality.

and that course is using the same theme?

can you ask the course author?