Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
komali2 opened this issue Jun 4, 2023 · 2 comments

Comments

@komali2
Copy link

komali2 commented Jun 4, 2023

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
Copy link
Contributor

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.

@jekyllbot jekyllbot added the stale label Aug 4, 2023
@joshkopecek
Copy link

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

@jekyllbot jekyllbot removed the stale label Oct 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants