我正在尝试在远程计算机(Ubuntu 18.04)上使用ruby 2.5.1构建一个Jekyll博客,并利用这样的.post_receive
钩子:
#!/bin/bash -l
GIT_REPO=$HOME/myrepo.git
TMP_GIT_CLONE=$HOME/tmp/myrepo
GEMFILE=$TMP_GIT_CLONE/Gemfile
PUBLIC_WWW=/var/www/myrepo
git clone $GIT_REPO $TMP_GIT_CLONE
BUNDLE_GEMFILE=$GEMFILE bundle install
BUNDLE_GEMFILE=$GEMFILE bundle exec jekyll build -s $TMP_GIT_CLONE -d $PUBLIC_WWW
rm -Rf $TMP_GIT_CLONE
exit
到目前为止,一切正常。上次推送后,出现以下错误:
Incremental build: disabled. Enable with --incremental
Generating...
Conversion error: Jekyll::Converters::Scss encountered an error while converting 'assets/css/main.scss':
Invalid US-ASCII character "\xE2" on line 54
jekyll 3.8.4 | Error: Invalid US-ASCII character "\xE2" on line 54
这是我的Gemfile
source "https://rubygems.org"
gem "jekyll", "~> 3.8.4"
gem "minimal-mistakes-jekyll"
group :jekyll_plugins do
gem "jekyll-feed", "~> 0.6"
end
gem "tzinfo-data", platforms: [:mingw, :mswin, :x64_mingw, :jruby]
gem "jekyll-sitemap"
gem 'jekyll-archives'
在我的开发环境中,一切正常。此外,我的项目中没有main.scss
。我不明白问题出在哪里以及为什么突然出现。