在将 jekyll 项目部署到 netlify 时,我缺少我的字体文件夹。
它在开发模式下完美运行,但是当我告诉它在生产中运行时,它似乎跳过了将我的字体文件夹添加到 _site/assets 目录。
我相信它必须在配置中,但我对 jekyll 和 YAML 还很陌生。在代码中,它似乎是在说将它下面的所有资产添加到构建过程中。
下面是我的 _config.yml 文件。
copy:
# Paths to static assets that aren't (S)CSS or JavaScript
# because these are completely handled by the sass and javascript tasks
assets:
# all files below the assets dir
- "assets/**/*"
# exclusions:
- "!assets/{js,scss,css}/**/*" # js, scss and css files
- "!assets/css{,/**}" # css dir
- "!assets/js{,/**}" # js dir
- "!assets/scss{,/**}" # scss dir
- "!assets/vendor{,/**}" # vendor di
dist: "_site/assets/"
notification: "Running Copy"