这似乎是一个非常基本的问题,但我找不到答案:-S
我这样排除:
exclude:
- "*.json"
- "Gemfile*"
- "*.txt"
- vendor
- README.md
- somefile.html
很简单。要创建我运行的生产版本:$ JEKYLL_ENV=production bundle exec jekyll build
如何仅在运行生产 ENV 时排除 somefile.html 文件?
也许您可以尝试使用特定的配置文件进行生产,使用特定的配置文件进行开发。在生产中,您可以按照此处所述使用 exclude 排除文件。
然后运行:
jekyll build --trace --config _config.yml,_config_dev.yml
或者
jekyll build --trace --config _config.yml,_config_prod.yml
在 _config.yml 中设置通用设置,在带有环境后缀的配置中设置环境特定配置。
跟踪标志是可选的,它将有助于设置它,因为它会显示发生的错误。
optional: -t, --trace Show the full backtrace when an error occurs
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句