Icarus 用户指南|升级指南

从5.x升级至6.x

  1. 将Node.js升级到14.0或者更新的版本。

  2. 下载源代码或者从NPM安装Icarus 6.x。 你可以在Icarus 用户指南|快速上手中找到安装指导。 如果你打算通过修改源代码的方式自定义主题,你必须从源代码安装主题。

  3. 运行hexo clean来清理缓存并让Icarus为你升级主题配置文件。

  4. 阅读更新说明最新文档来了解更多新功能的信息。

从4.x升级至5.x

  1. 将Node.js升级到12.4.0或者更新的版本。

  2. 下载源代码或者从NPM安装Icarus 5.x。 你可以在Icarus 用户指南|快速上手中找到安装指导。 如果你打算通过修改源代码的方式自定义主题,你必须从源代码安装主题。

  3. 运行hexo clean来清理缓存并让Icarus为你升级主题配置文件。

  4. 阅读更新说明最新文档来了解更多新功能的信息。

从3.x升级至4.x

  1. 将Node.js升级到10.13.0或者更新的版本。

  2. 下载源代码或者从NPM安装Icarus 4.x。 你可以在Icarus 用户指南|快速上手中找到安装指导。 如果你打算通过修改源代码的方式自定义主题,你必须从源代码安装主题。

  3. 运行hexo clean来清理缓存。 按照Icarus的提示安装缺失的依赖软件包:

    命令行
    1
    2
    3
    4
    5
    6
    $ hexo clean
    ...
    ERROR Please install the missing dependencies your Hexo site root directory:
    ERROR npm install --save hexo@^5.0.2 hexo-component-inferno@^0.8.2 hexo-log@^2.0.0 hexo-util@^2.2.0
    ERROR or:
    ERROR yarn add hexo@^5.0.2 hexo-component-inferno@^0.8.2 hexo-log@^2.0.0 hexo-util@^2.2.0
  4. 再次运行hexo clean来让Icarus为你升级主题配置文件。 Icarus会备份并删除themes/icarus/_config.yml文件,然后创建_config.icarus.yml作为新的主题配置文件。 你可以参考_config.icarus.yml.example来了解示例配置.

    命令行
    1
    2
    3
    4
    5
    6
    7
    8
    9
    $ hexo clean
    ...
    WARN Your theme configuration is outdated (3.0.0 < 4.0.0).
    INFO To skip the configuration upgrade, use "--icarus-dont-upgrade-config".
    INFO Backing up theme configuration files...
    INFO themes/icarus/_config.yml => themes/icarus/_config.yml.dc00f8b8f8bc03ede351d711e958dc4b
    INFO Upgrading theme configurations...
    INFO Theme configurations are written to /tmp/_config.icarus.yml.
    INFO Example configurations is at /tmp/_config.icarus.yml.example.
  5. Icarus现在将文章的缩略图和封面图区别对待。 对于有缩略图的所有文章/页面,将其front-matter中的thumbnail:更改为cover:

    post.md
    1
    2
    3
    4
    5
      title: Icarus快速上手
    date: 2020-04-01
    - thumbnail: /gallery/covers/vector_landscape_1.svg
    + cover: /gallery/covers/vector_landscape_1.svg
    ---

    你仍可以在front-matter中设置thumbnail来在文章归档页面以及最新文章挂件中显示小一点的缩略图。

  6. 阅读更新说明最新文档来了解更多新功能的信息.

Icarus 用户指南|CDN 提供商

选择合适的CDN提供商可以大幅度减少网站访客的网页加载时间。 Icarus为你提供了几种内置的CDN提供商来承载Icaurs所用到的第三方库和资源文件的加载。

阅读更多

Icarus 用户指南|赞赏按钮

本文介绍Icarus 5支持的赞赏按钮的安装配置。 若需同时展示多个按钮,只需像如下这样在主题配置的donates数组中添加多个按钮配置:

_config.icarus.yml
1
2
3
4
5
6
7
donates:
-
type: ... # 按钮1
...
-
type: ... # 按钮2
...
阅读更多

Icarus 用户指南|挂件

本文介绍Icarus 5支持的页面挂件的安装配置。 若要同时展示多个挂件,只需在主题配置的widgets数组中添加多个挂件配置。 它们会按照定义的顺序出现。 每个挂件必须包含type(挂件类型)与position(挂件展示位置)设置项。 示例如下:

_config.icarus.yml
1
2
3
4
5
6
7
8
9
widgets:
-
type: ... # 挂件1
position: left
...
-
type: ... # 挂件2
position: right
...
阅读更多
Your browser is out-of-date!

Update your browser to view this website correctly.&npsb;Update my browser now

×