Getting a sass error when overwriting default minima theme

Hi,
I’m hoping there a friendly soul here who can help.

I’m using https://forestry.io/ as a CMS.

I’m trying to overwrite the default minima theme by converting it to a regular theme. I copied all the theme files from the gem folder, and pasted them in root of my site.

/assets
/_layouts
/_includes
/_sass

Removed the reference to minima in _config.yml and the Gemfile. As described in the docs -> https://jekyllrb.com/docs/themes/

I then renamed instances of “minima” in all directories, files and @import statements inside the .scss files from to “myTheme”.

And it works lovely serve the site locally with “Jekyll serve”. But when I commit and push the change to a repo Forestry builds the site, with no errors. But when I go to visit a preview or on the “live” site. I get this error from main.scss.

Error: Invalid CSS after "...t "myTheme"": expected "{", was ";"
        on line 5 of main.scss

1: ---
2: # Only the main Sass file needs front matter (the dashes are enough)
3: ---
4: 
5: @import "myTheme";

But I can’t see what is wrong. That import looks correct to me.
Thanks.

If I am not wrong, I think you might have edited or delete the file index.md or index.html in the root directory.

I actually had modified the index.md. I had only removed the comments.

For good measure I reverted it back to the original and committed the changes. Unfortunately still the same result.

But if I go and delete that import statement, I get the error:

/usr/local/bin/scss --no-cache --update main.scss:main.css
      error main.scss (Line 3: Invalid CSS after "---": expected "{", was "")

Did you rename these files and their @imports correctly too?

assets/main.scss imports _sass/minima.scss which imports partials in _sass/minima/. The error you’re getting tells me you have something named incorrectly in one or all those files.

1 Like

I am sure I didn’t. But I went over it again and again, without finding the typo. So I gave up hours ago, reverted back to minima, and customized from there… Not very elegant :smiley: