我是 jekyll 的新手,所以首先我遵循本教程 Jekyll on Windows并设置 jekyll 3.3.0。我在本教程中收到有关证书的错误 SSL CERTIFICATE UPDATES 并通过使用这个 cacert.pem证书解决问题。 但是,当启动 jekyll 服务器时,我得到:
--watch arg is unsupported on Windows. If you are on Windows Bash, please see: https://github.com/Microsoft/BashOnWindows/issues/216
我尝试使用 Let Jekyll --watch 解决这个问题没有任何运气。 如果我使用 jekyll 3.2.1,一切正常,但 jekyll 3.3.0 有问题。 那么如何解决这个问题呢?
编辑
我解决了阅读问题this并在 C:\tools\ruby23\lib\ruby\gems\2.3.0\gems\jekyll-3.3.0\lib\jekyll\的
启用自动再生,现在一切正常。 build.rb
文件中注释一些代码命令
def watch(site, options)
#if Utils::Platforms.windows?
# Jekyll.logger.warn "", "--watch arg is unsupported on Windows. "
# Jekyll.logger.warn "", "If you are on Windows Bash, please see: " \
# "https://github.com/Microsoft/BashOnWindows/issues/216"
# else
External.require_with_graceful_fail "jekyll-watch"
watch_method = Jekyll::Watcher.method(:watch)
if watch_method.parameters.size == 1
watch_method.call(
options
)
else
watch_method.call(
options, site
)
# end
end
最佳答案
我想你可以直接输入 jekyll serve
。
关于ruby - --watch arg 在 Windows 上不受支持,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39970672/