Hexo主题Icarus更换

Hexo主题Icarus更换

Hexo主题更换

下载主题

进入网站所在目录

1
cd /www/wwwroot/blog.123066.xyz

获取主题文件

1
git clone https://github.com/ppoffice/hexo-theme-icarus.git themes/icarus

稍等片刻,主题就会Git下来,出现Checking connectivity... done.即可进入下一步。

启用主题

进入宝塔web端,使用在线编辑器打开根目录下的_config.yml配置文件,找到theme: landscape(96行附近),将其修改为theme: icarus,再重新编译网站

1
hexo g

安装依赖

enter image description here
重新编译网站后,主题会提示报错,缺少不少依赖包,因此需要执行

1
2
3
npm install --save bulma-stylus@0.8.0 hexo-component-inferno@^0.4.0 hexo-renderer-inferno@^0.1.3 inferno@^7.3.3 inferno-create-element@^7.3.3
或者
yarn add bulma-stylus@0.8.0 hexo-component-inferno@^0.4.0 hexo-renderer-inferno@^0.1.3 inferno@^7.3.3 inferno-create-element@^7.3.3

再重新编译网站网站hexo g后,如无意外会出现以下提示
enter image description here

初见成效

访问网站,可以看到新的主题已启用成功
enter image description here

细节优化

由于该主题已经有很详细的中文文档了,在此就不再造轮子了,点击传送门即可看到详细的配置