通过配置可让Jekyll编译的时候自动生成站点的Sitemap,在_config.yml中添加如下信息即可:

gems:
  - jekyll-sitemap

本地编译要安装jekyll-sitemap组件gem install jekyll-sitemap,但安装中提示错误 Could not find a valid gem

C:\Users\Abel-work>gem install jekyll-sitemap
ERROR:  Could not find a valid gem 'jekyll-sitemap' (>= 0), here is why:
          Unable to download data from https://rubygems.org/ - SSL_connect retur
ned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (
https://rubygems.org/latest_specs.4.8.gz)

查到好多同样问题的,我重新设置源解决了问题。添加和移除源的命令如下:

gem source --remove https://rubygems.org
gem source -a https://rubygems.org

若问题仍然存在,试试将https源替换为http的 gem source -a http://rubygems.org