步骤

新建一个空的件夹,在里面使用hexo init初始化。跟插件相关的是这三个文件/文件夹。

  1. node_modules文件夹
  2. package.json
  3. package-lock.json

删除需要重装插件的Hexo文件夹中这三个文件/文件夹,然后复制粘贴刚初始化的Hexo文件夹中这三个文件/文件夹即可。

必装插件

hexo-renderer-stylus(Butterfly主题依赖):npm install hexo-renderer-pug hexo-renderer-stylus –save

hexo-butterfly-envelope(信封样式留言板):npm install hexo-butterfly-envelope –save

hexo-abbrlink(文章自动url编码):npm install hexo-abbrlink –save

hexo-generator-search(本地搜索):npm install hexo-generator-search –save

hexo-filter-nofollow(外链不计算权重):npm i hexo-filter-nofollow –save

hexo-wordcount(字数统计):npm i hexo-wordcount –save

hexo-auto-front-matter(自动生成 front-matter):npm install hexo-auto-front-matter –save

hexo-neat(静态资源压缩):npm install hexo-neat –save