-
安装
ruby开发环境和bundler; -
在
Gemfile中添加jekyll,运行bundle会自动安装所有依赖,如果在使用bundle安装过程中出现allocat memory错误, 可以直接通过gem install xxx -v '版本号'进行安装; -
安装完
jekyll后通过jekyll serve或者bundle exec jekyll serve命令启动jekyll服务,这时你会发现出现了下面的错误:jekyll 3.4.0 | Error: Invalid argument - Failed to watch "/mnt/c/Users/xr_li/OneDrive/Projects/xrlin.github.io/.git/hooks": the given event mask contains no legal events; or fd is not an inotify file descriptor.这时通过添加
--force_polling这个option便可以避免这错误,即运行jekyll serve --force_polling命令。