Serving minima example works fine, built HTML website shows no CSS

Hey everyone:

Jekyll n00b here, just trying to get the basic website created using jekyll new source_dir up and running. The example website looks totally fine when running the server and visiting localhost:4000 in browser, but after running jekyll build and opening the resulting _site/index.html file in browser, all the CSS is gone. I haven’t modified any of the file locations, and the main.css file still seems to be exactly where it should be based on the reference in index.html, but there’s zero formatting in the resulting webpage. Is there something simple I’m missing here?

I’m running ubuntu 16.04 and I’ve tried both chrome and firefox. I’ve also copied the folder (renamed as public_html) to an external server (the one where I eventually plan to host) to see if there was something weird about the way my computer was serving it locally, but the CSS was still not displayed.

Thanks! Any help is appreciated.

Okay, it seems like there’s an error with jekyll build where the imported stylesheet has an extra / at the beginning; once I deleted it, everything seems okay. Guess I should file a bug report? Has anyone else experienced this?

build and serve treat urls a little differently - serve tries to make it friendly for local dev so if you have a value for site.url in your config serve should work as it will swap out that value for localhost - build will not, so locally it would fail.

My guess is that since you are a self described n00b that it is user error rather than a bug. You may just have something in the config that is not quite correct.

Without seeing the config file or the whole repo hard to tell though.