Himmators
Himmators

Reputation: 15006

jekyll serve only updates sass when I save the main file

I have a jekyll project that looks like this:

- assets
-- css
--- main.scss
-- sass
--- base
---- _root.scss
--- vendor
---- normalize.scss

main.scss includes the files

---
---
@charset "utf-8";

@import 'vendor/normalize';

@import 'base/root';

Here are the config.yml-settings that might be relevant

# Sass settings
sass:
  add_charset: true
  sass_dir: assets/sass
  style: :compressed

# Build settings
exclude:
  - Gemfile
  - Gemfile.lock
  - package.json
  - README.md
  - CNAME
  - node_modules
  - assets/sass

The sass works and gets generated into the right folders, but it seems like sass only listens to updates of main.scss when I run jekyll serve I have tried putting all files in /assets/sass/ and also putting all files in assets/css/, but none of these things work either.

Upvotes: 0

Views: 53

Answers (1)

Himmators
Himmators

Reputation: 15006

I moved the files from /assets/css/ to /_css and removed the setting sass_dir: from config.yml, this worked, not sure why, but it seems that jekyll only listens to sass changes in that folder. Hopefully this is heplpful for someone!

Upvotes: 1

Related Questions