mkdocs - Config value: ‘plugins‘. Error: The “minify“ plugin is not installed

mkdocs - Config value: ‘plugins’. Error: The “minify” plugin is not installed

概述

想编译一下mkdocs-material 官方库, 报错如下

D:\3rd_prj\mkdocs-material>mkdocs build
ERROR    -  Config value: 'plugins'. Error: The "minify" plugin is not installed
Aborted with 1 Configuration Errors!

设置国内源

为了提高装库的速度, 选择国内源

腾讯源:

pip config set global.index-url http://mirrors.cloud.tencent.com/pypi/simple

pip config set global.trusted-host mirrors.cloud.tencent.com

清华源:

pip config set global.index-url http://pypi.tuna.tsinghua.edu.cn/simple

pip config set global.trusted-host pypi.tuna.tsinghua.edu.cn

阿里源:

pip config set global.index-url http://mirrors.aliyun.com/pypi/simple

pip config set global.trusted-host mirrors.aliyun.com

这3个国内源, 选一个就行, 我选的清华源

尝试查找minify插件的具体名字

但是我不知道minify插件的具体名字

D:\3rd_prj\mkdocs-material>pip search mkdocs query
ERROR: XMLRPC request failed [code: -32500]
RuntimeError: PyPI's XMLRPC API is currently disabled due to unmanageable load and will be deprecated in the near future. See https://status.python.org/ for more information.

运行pip search报错
查了资料, 可以用pip-search插件来查找

安装pip-search插件

D:\3rd_prj\mkdocs-material>pip install pip-search
...
Successfully built bs4
Installing collected packages: commonmark, soupsieve, rich, beautifulsoup4, bs4, pip-search
Successfully installed beautifulsoup4-4.11.1 bs4-0.0.1 commonmark-0.9.1 pip-search-0.0.12 rich-12.6.0 soupsieve-2.3.2.post1

用pip_search来查找minify插件的具体名称

D:\3rd_prj\mkdocs-material>pip_search minify

在这里插入图片描述
可以看到 mkdocs-minify-plugin 就是minify插件的具体名称

尝试安装minify插件

pip install mkdocs-minify-plugin

...
Successfully built mkdocs-minify-plugin csscompressor htmlmin jsmin
Installing collected packages: jsmin, htmlmin, csscompressor, mkdocs-minify-plugin
Successfully installed csscompressor-0.9.5 htmlmin-0.1.12 jsmin-3.0.1 mkdocs-minify-plugin-0.5.0

可以看到, mkdocs-minify-plugin-0.5.0 安装成功了.

END

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值