jekyll / minima

Minima is a one-size-fits-all Jekyll theme for writers.
https://jekyll.github.io/minima/
MIT License
3.44k stars 3.63k forks source link

`Error: Can't find stylesheet to import` when following instructions to overwrite default styles #735

Open komali2 opened 1 year ago

komali2 commented 1 year ago

I'm following the instructions to override styles at https://github.com/jekyll/minima#customizing-templates

Per instructions, I've created a file at assets/css/style.scss with the contents:

---
---

@import
"minima/skins/{{ site.minima.skin | default: 'classic' }}",
"minima/initialize";

When I do bundle exec jekyll serve, I see the following error:

Error: Can't find stylesheet to import.
  ╷
2 │ "minima/skins/classic",
  │ ^^^^^^^^^^^^^^^^^^^^^^
  ╵
  /home/caleb/src/thejispot/docs/assets/css/style.scss 2:1  root stylesheet 
  Conversion error: Jekyll::Converters::Scss encountered an error while converting 'assets/css/style.scss':
                    Can't find stylesheet to import.
                    ------------------------------------------------
      Jekyll 4.3.2   Please append `--trace` to the `serve` command 
                     for any additional information or backtrace. 
                    ------------------------------------------------
/home/caleb/gems/gems/jekyll-sass-converter-3.0.0/lib/jekyll/converters/scss.rb:175:in `rescue in convert': Can't find stylesheet to import. (Jekyll::Converters::Scss::SyntaxError)
    from /home/caleb/gems/gems/jekyll-sass-converter-3.0.0/lib/jekyll/converters/scss.rb:159:in `convert'

My gemfile looks like this:

source "https://rubygems.org"
# Hello! This is where you manage which Jekyll version is used to run.
# When you want to use a different version, change it below, save the
# file and run `bundle install`. Run Jekyll with `bundle exec`, like so:
#
#     bundle exec jekyll serve
#
# This will help ensure the proper Jekyll version is running.
# Happy Jekylling!
gem "jekyll", "~> 4.3.2"
# This is the default theme for new Jekyll sites. You may change this to anything you like.
gem "minima", "~> 2.5"
# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
# uncomment the line below. To upgrade, run `bundle update github-pages`.
# gem "github-pages", group: :jekyll_plugins
# If you have any plugins, put them here!
group :jekyll_plugins do
  gem "jekyll-feed", "~> 0.12"
end

# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem
# and associated library.
platforms :mingw, :x64_mingw, :mswin, :jruby do
  gem "tzinfo", ">= 1", "< 3"
  gem "tzinfo-data"
end

# Performance-booster for watching directories on Windows
gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin]

# Lock `http_parser.rb` gem to `v0.6.x` on JRuby builds since newer versions of the gem
# do not have a Java counterpart.
gem "http_parser.rb", "~> 0.6.0", :platforms => [:jruby]

And my _config.yml looks like:

title: The Ji Spot
email: biscuit@thejispot.com
description: >- # this means to ignore newlines until "baseurl:"
  We serve the best chicken biscuit sandwiches in Taiwan.
baseurl: "" # the subpath of your site, e.g. /blog
url: "https://thejispot.com" # the base hostname & protocol for your site, e.g. http://example.com
twitter_username:
github_username:
theme: minima
plugins:
  - jekyll-feed

I'm guessing I have library versions mismatched or something? What's the correct way to override styles?

jekyllbot commented 1 year ago

This issue has been automatically marked as stale because it has not been commented on for at least two months.

The resources of the Jekyll team are limited, and so we are asking for your help.

If this is a bug and you can still reproduce this error on the master/main branch, please reply with all of the information you have about it in order to keep the issue open.

If this is a feature request, please consider whether it can be accomplished in another way. If it cannot, please elaborate on why it is core to this project and why you feel more than 80% of users would find this beneficial.

This issue will automatically be closed in two months if no further activity occurs. Thank you for all your contributions.

joshkopecek commented 1 year ago

I faced exactly the same problem, but examining the minima directory reveals that there is no minima/skins/ directory.

I just used

@import 'minima';

in assets/main.scss