Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I make Jekyll exclude my config.rb for SASS?

Tags:

jekyll

In Jeky'll's _config.yml file I have the following at the bottom: exclude: README.md, css/config.rb

It excludes the README fine, but not the config.rb file. What am I doing wrong?

like image 950
Doug Smith Avatar asked Jul 18 '13 23:07

Doug Smith


1 Answers

This is a problematic feature of Jekyll for quite some time.

Just to be sure: what version of Jekyll are you using? The latest ones enforce correct YAML handling, so you should be using the array syntax (exclude: [README.md, config.rb]).

It's possible with the current implementation to use glob syntax and exclude a whole directory (or tree of directories or whatever), but I couldn't find an issue or documentation on how to exclude a specific file in the filesystem.

In any case, you can exclude config.rb. I assume you don't have another one in your site, and even if you have, you probably don't want it to be on _site. This is bad overall, but works. Your exclude rule would be exclude: [README.md, config.rb].

like image 192
agarie Avatar answered Oct 20 '22 03:10

agarie