pages-themes / primer

Primer is a Jekyll theme for GitHub Pages
https://pages-themes.github.io/primer/
MIT License
277 stars 261 forks source link

When built on github pages, site.theme is `primer`, not `jekyll-theme-primer`, so sass import breaks #58

Closed deargle closed 3 years ago

deargle commented 3 years ago

The instructions say that /assets/css/style.scss should start with the following:

---
---

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

This build fine locally. However, this leads to the following error on a github pages build:

Your site is having problems building: Your SCSS file assets/css/style.scss has an error on line 1: File to import not found or unreadable: primer. Load path: /tmp/jekyll-remote-theme-20210722-6-at4n5p/_sass. For more information, see https://docs.github.com/github/working-with-github-pages/troubleshooting-jekyll-build-errors-for-github-pages-sites#invalid-sass-or-scss.

It works when I hard-code the sass to say:

---
---
@import "jekyll-theme-primer";
peterbrightwell commented 3 years ago

+1 to a fix for this as we have a lot more repos that will need workarounds. Was working ok till quite recently.

peterbrightwell commented 3 years ago

While working on this I noticed that the README mentions remote_theme: pages-themes/primer@v0.2.0 which then gives:

... 404 - Not Found - Loading URL: https://codeload.github.com/pages-themes/primer/zip/v0.2.0 (Jekyll::RemoteTheme::DownloadError)

It looks like it should be v0.6.0?

parkr commented 3 years ago

This has been fixed! There are both primer and jekyll-theme-primer scss files.