I\'m trying to create a website using Jekyll, and everything worked fine. Until I wanted to custom the design.
I\'ve updated my css/main.scss
in order to in
I've run into similar issues when trying to use Jekyll to pass YAML content into partials. It looks like this workflow is not possible.
The work around was to place all variables on the main SCSS file and get Jekyll to populate the values from YAML, then using partials for the actual styles.
Here's a simple repo with some of my solutions: https://github.com/guschiavon/jekyllfy-sass
First add to your config.yml
sass:
sass_dir: _sass
Then add to top in your main.scss file, two dashed lines https://jekyllrb.com/docs/assets/
---
---
@charset "utf-8";
After that write in your cmd console
jekyll serve
and check your compilation.
Have you added the front matter to the top of your main.scss file?
Ok, I get it !
You have a css/main.css
files that is copied as a static file in _site/css/main.css
.
The problem is that it has the same name as the css/main.scss
target which is also _site/css/main.css
.
So at first build :
css/main.scss
is processed to main.css
css/main.css
.Solution : delete css/main.css