2

I downloaded the jekyll-theme-clean-blog theme and successfully built it locally.

Once I move it to github pages, I get the following build error:

Your SCSS file assets/main.scss has an error on line 2: File to import not found or unreadable: ../assets/vendor/startbootstrap-clean-blog/scss/clean-blog.scss. Load paths: _sass /hoosegow/.bundle/ruby/2.7.0/gems/jekyll-theme-primer-0.5.4/_sass /hoosegow/.bundle/ruby/2.7.0/gems/jekyll-theme-primer-0.5.4/_sass.

I added

sass: sass_dir: _sass style: :compressed

to config file, still wont build on github pages.

Any help would be much appreciated.

Izz
  • 45
  • 4

1 Answers1

1

GitHub Pages only supports a select number of themes (https://pages.github.com/themes/) listed below:

  • Architect
  • Cayman
  • Dinky
  • Hacker
  • Leap day
  • Merlot
  • Midnight
  • Minima
  • Minimal
  • Modernist
  • Slate
  • Tactile
  • Time machine

The one you've named isn't in that list. Basically this is the same issue as not being able to use Jekyll plugins. The solutions there are to use a different hosting solution, or commit the built output of your site to a repo.

Ross
  • 2,701
  • 16
  • 25
  • Thanks for this. I saw that it wasn't a supported theme, but it seemed like it should nevertheless work. I guess not. As far as committing the build output as well, is that just a matter of removing files from gitignore? – Izz Aug 26 '20 at 01:55
  • 1
    I believe you could commit the `_site` folder, then use that folder as your base. I'd create a new repo and build the site into there though - that way you keep the output and source separate, as well as a nicer git history. – Ross Aug 26 '20 at 02:09
  • Thanks. If output and source are in separate repos, gh pages will be able to run it? Won't it need both parts? – Izz Aug 26 '20 at 02:15
  • The build output is a full static site, which doesn't need the source at all. The source doesn't need the output either, since it replaces the whole thing each time. GitHub Pages can just serve the output alone, I think it's actually their recommended workflow if you need custom plugins. – Ross Aug 26 '20 at 03:24
  • Thanks for taking the time to clarify that. I'm building locally and then moving _site to gh pages. Ran into one issue where local host or 127.0.0.1 is referenced since it was built locally. Need to figure out how to change that. Other than that it works great. – Izz Aug 26 '20 at 04:31