GitHub Pages breaks upon adding assets/css/style.scss

When I have a customization to the cayman theme using assets/css/style.scss, the site doesn’t publish any more. It fails with the following message:

Your SCSS file assets/css/style.scss has an error on line 1: File to import not found or unreadable: . Load paths: _sass /tmp/jekyll-remote-theme-20210724-6-1i1pm44/_sass.

Removing assets/css/style.scss solves the problem, but when I add it again, it’s broken again. When it’s added, it breaks on the import, whether you import just "" or "{{ site.theme }}" .

1 Like

Note, the problem doesn’t seem to be related to the Cayman theme, but to customizations in general across all or at least many themes.

I’ve started having exactly the same issue. A less-than-ideal-but-seems-to-work fix is to run Jekyll locally and then copy the generated _site/assets/css/style.css file into a file that can be referenced by assets/css/style.scss. So your style.scss file looks something like this:

---
---

@import "2021-07-25-pages-fix-cayman-sass/generated-style.css";
... your customisation here