这两天刚好要升级一些博客的插件来解决一些安全问题,顺便记录一下
修改Gemfile
- 添加依赖
source + 'URL'
表示数据来源gem 'module_name','version',group:
模块
source ‘https://rubygems.org’
gem ‘jekyll-admin’, group: :jekyll_plugins gem ‘jekyll-paginate’ gem “rack”, “>= 1.6.12”
修改package-lock.json
可访问https://registry.npmjs.org/xxx
获取所有版本信息,xxx
为模块名
以下是例子
“lodash”: { “version”: “4.17.12”, “resolved”: “https://registry.npmjs.org/lodash/-/lodash-4.17.12.tgz”, “integrity”: “sha512-+CiwtLnsJhX03p20mwXuvhoebatoh5B3tt+VvYlrPgZC1g36y+RRbkufX95Xa+X4I59aWEacDFYwnJZiyBh9gA==” },
编译运行
jekyll serve
- 若
gem
提示版本被锁,可执行gem
更新操作bundle update xxx(模块名)
- 若提示
You have already activated public_suffix 4.0.3, but your Gemfile requires public_suffix 3.0.3. Prepending bundle exec to your command may solve this. (Gem::LoadError)
等类似的错误,可以尝试在指令前加bundle exec
bundle exec jekyll serve
- 若