在 Jeky'll 的_config.yml
文件中,底部有以下内容:exclude: README.md, css/config.rb
它不包括 README,但不包括 config.rb 文件。我究竟做错了什么?
在 Jeky'll 的_config.yml
文件中,底部有以下内容:exclude: README.md, css/config.rb
它不包括 README,但不包括 config.rb 文件。我究竟做错了什么?
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]
.