pages-themes / midnight

Midnight is a Jekyll theme for GitHub Pages
https://pages-themes.github.io/midnight/
Creative Commons Zero v1.0 Universal
305 stars 566 forks source link

Referencing {{site.theme}} in style.scss fails #35

Closed olifre closed 3 years ago

olifre commented 3 years ago

The suggested use of

 @import "{{ site.theme }}";

in style.scss stopped working with GitHub pages sometime this week, it seems the deployment now explicitly sets site.theme to midnight if that is selected in the GitHub Pages configuration (overriding things from _config.yml).

So when setting:

theme: jekyll-theme-midnight

and using the above import with Midnight as GitHub theme (not remote theme), I get the build error:

Your SCSS file `assets/css/style.scss` has an error on line 1: File to import not found or unreadable: midnight. Load path: /tmp/jekyll-remote-theme-20210723-6-1teumon/_sass.

I did not find any announcement on this, so this could also be a GitHub pages bug — if not, we should probably hardcode the site.theme to ʼjekyll-theme-midnight`.

olifre commented 3 years ago

Fixed by https://github.com/pages-themes/midnight/pull/36, many thanks! :+1: .