diff --git a/_config.yml b/_config.yml index beafbae..9f46fee 100644 --- a/_config.yml +++ b/_config.yml @@ -89,7 +89,8 @@ deploy: branch: gh-pages marked: - gfm: false + gfm: true + breaks: false githubEmojis: className: not-gallery-item diff --git a/package.json b/package.json index ded081a..613e425 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "0.0.0", "private": true, "hexo": { - "version": "6.0.0" + "version": "6.2.0" }, "dependencies": { "bulma-stylus": "0.8.0", @@ -20,9 +20,9 @@ "hexo-renderer-marked": "^4.0.0", "hexo-renderer-stylus": "^2.0.0", "hexo-server": "^3.0.0", - "hexo-theme-icarus": "^5.0.0-rc.1" + "hexo-theme-icarus": "^5.0.1" }, "resolutions": { "stylus": "^0.54.8" } -} +} \ No newline at end of file diff --git a/scripts/tab.js b/scripts/tab.js deleted file mode 100644 index 334beca..0000000 --- a/scripts/tab.js +++ /dev/null @@ -1,37 +0,0 @@ -hexo.extend.injector.register( - "body_end", - () => { - return ` - - `; - }, - "post" -); diff --git a/source/_posts/demo/comment/Waline.md b/source/_posts/demo/comment/Waline.md index fe63bdc..e3e8912 100644 --- a/source/_posts/demo/comment/Waline.md +++ b/source/_posts/demo/comment/Waline.md @@ -5,6 +5,7 @@ tags: comment: type: waline server_url: https://icarus-waline-comment.vercel.app + path: window.location.pathname lang: en-US visitor: false emoji: @@ -15,14 +16,12 @@ comment: - mail - link required_meta: - login: enable - avatar: mp + login: 'enable' word_limit: 0 page_size: 10 - avatar_cdn: 'https://sdn.geekzu.org/avatar/' - avatar_force: false + upload_image: false highlight: true - math_tag_support: false + math: false copyright: true locale: placeholder: 'Comment here...' diff --git a/source/_posts/en/CDN-Providers.md b/source/_posts/en/CDN-Providers.md index b3bb573..6e23d92 100644 --- a/source/_posts/en/CDN-Providers.md +++ b/source/_posts/en/CDN-Providers.md @@ -38,12 +38,18 @@ Currently, Icarus offers the following built-in CDN providers: - jsDelivr (`jsdelivr`) - UNPKG (`unpkg`) - loli.net (`loli`) + - BootCDN (`bootcdn`) + - 75CDN (`75cdn`) - **CDNs for Web Fonts** - Google Fonts (`google`) - loli.net (`loli`) + - font.im (`fontim`) + - ustc.edu.cn (`ustc`) - **FontAwesome Font Icon CDNs** - FontAwesome 5 (`fontawesome`) - loli.net (`loli`) + - BootCDN (`bootcdn`) + - 75CDN (`75cdn`) The default CDN settings are: diff --git a/source/_posts/en/Comment-Plugins.md b/source/_posts/en/Comment-Plugins.md index 8dfa693..d0cadc6 100644 --- a/source/_posts/en/Comment-Plugins.md +++ b/source/_posts/en/Comment-Plugins.md @@ -372,6 +372,26 @@ However, unlike the other services, Isso requires a web host for running the Iss {% endcodeblock %} +## Twikoo + +Twikoo is a self-hosted comment system based on cloud functions. +Unlike other third-party comment services, the Twikoo backend needs to be deployed to a cloud +environment before being configured and used by Icarus. + +**Installation Guide** + +1. Follow the [Twikoo documentation](https://twikoo.js.org/en/) to deploy the Twikoo cloud function + to a cloud service provider of your choice. + +2. Fill in the `env_id` of your deployment to the corresponding setting in the theme configurations. + + {% codeblock _config.icarus.yml lang:yaml %} + comment: + type: twikoo + env_id: xxxxxxxx + {% endcodeblock %} + + ## utterances
@@ -494,24 +514,23 @@ services until this issue has been fixed. comment: type: waline server_url: https://your-domain.vercel.app - lang: zh-CN # Optional + path: window.location.pathname # Optional + lang: en-US # Optional visitor: false # Optional emoji: # Optional - - 'https://cdn.jsdelivr.net/gh/walinejs/emojis/weibo' + - 'https://cdn.jsdelivr.net/gh/walinejs/emojis/weibo' dark: auto # Optional meta: ["nick", "mail", "link"] # Optional required_meta: [] # Optional login: enable # Optional - avatar: mp # Optional word_limit: 0 # Optional page_size: 10 # Optional - avatar_cdn: 'https://sdn.geekzu.org/avatar/' # Optional - avatar_force: false # Optional + upload_image: false # Optional highlight: true # Optional - math_tag_support: false # Optional + math: false # Optional copyright: true # Optional locale: # Optional - placeholder: 'Comment here...' + placeholder: 'Comment here...' {% endcodeblock %} diff --git a/source/_posts/en/Configuring-Theme.md b/source/_posts/en/Configuring-Theme.md index 051d76c..19c9183 100644 --- a/source/_posts/en/Configuring-Theme.md +++ b/source/_posts/en/Configuring-Theme.md @@ -34,7 +34,7 @@ Icarus uses it to determine whether to upgrade the default theme configuration f You should not change it by yourself. {% codeblock _config.icarus.yml lang:yaml %} -version: 4.0.0 +version: 5.0.0 {% endcodeblock %} ### Theme Variant diff --git a/source/_posts/en/Getting-Started.md b/source/_posts/en/Getting-Started.md index 2e46d29..0db56dc 100644 --- a/source/_posts/en/Getting-Started.md +++ b/source/_posts/en/Getting-Started.md @@ -29,49 +29,35 @@ open to a sea of improvement possibilities. Before you continue to the installation of Icarus, take some time to review the [Hexo documentation](https://hexo.io). To install Icarus, take one of the following approaches: + +{% tabs align:left style:boxed %} + +Download the source code tarball from the GitHub and extract it to your Hexo site's theme +directory. +Alternatively, you can use Git to clone the Icarus repository to the `themes` directory: -
- -
-
- Download the source code tarball from the GitHub and extract it to your Hexo site's theme - directory. - Alternatively, you can use Git to clone the Icarus repository to the `themes` directory: +{% codeblock "Git Bash/Shell" %} +git clone https://github.com/ppoffice/hexo-theme-icarus.git themes/icarus -b --depth 1 +{% endcodeblock %} - {% codeblock "Git Bash/Shell" %} - git clone https://github.com/ppoffice/hexo-theme-icarus.git themes/icarus -b --depth 1 - {% endcodeblock %} +You can omit `-b ` to get the latest development version of Icarus. +Leave `--depth 1` out if you want to download full Git commit history of Icarus as well. +Furthermore, you can install Icarus as a Git submodule with the following command: - You can omit `-b ` to get the latest development version of Icarus. - Leave `--depth 1` out if you want to download full Git commit history of Icarus as well. - Furthermore, you can install Icarus as a Git submodule with the following command: +{% codeblock "Git Bash/Shell" %} +git submodule add https://github.com/ppoffice/hexo-theme-icarus.git themes/icarus +{% endcodeblock %} + - {% codeblock "Git Bash/Shell" %} - git submodule add https://github.com/ppoffice/hexo-theme-icarus.git themes/icarus - {% endcodeblock %} -
+ +To install Icarus as a node package via NPM, run the following command +from the root of your Hexo site: - +{% codeblock "Shell" %} +npm install -S hexo-theme-icarus hexo-renderer-inferno +{% endcodeblock %} + +{% endtabs %}
diff --git a/source/_posts/en/Search-Plugins.md b/source/_posts/en/Search-Plugins.md index 28e2dd6..986f468 100644 --- a/source/_posts/en/Search-Plugins.md +++ b/source/_posts/en/Search-Plugins.md @@ -171,6 +171,7 @@ Please refer to it for a complete list of supported plugins and their configurat {% codeblock _config.icarus.yml lang:yaml %} search: type: insight + include_pages: true # Optional. Set to `false` to exclude pages from search results. {% endcodeblock %} diff --git a/source/_posts/en/Upgrade-Guide.md b/source/_posts/en/Upgrade-Guide.md index b24e315..4886613 100644 --- a/source/_posts/en/Upgrade-Guide.md +++ b/source/_posts/en/Upgrade-Guide.md @@ -15,6 +15,22 @@ toc: true +### Upgrading from 4.x to 5.0 + +1. Upgrade Node.js to 12.4.0 or a newer version. + +2. Install Icarus 5.x either via source code dowload or NPM install. + You can find instructions in {% post_link en/Getting-Started %}. + If you plan to customize the theme by altering its source code, you are required to install + the theme from source code. + +3. Run `hexo clean` to clear cache files and let Icarus upgrade your theme configuration file for + you. + +4. Check out the [release notes](https://github.com/ppoffice/hexo-theme-icarus/releases) and the + [latest documentation](https://ppoffice.github.io/hexo-theme-icarus/categories/) for more + information of the new features. + ### Upgrading from 3.x to 4.x 1. Upgrade Node.js to 10.13.0 or a newer version. diff --git a/source/_posts/en/Widgets.md b/source/_posts/en/Widgets.md index 589fe88..7238e02 100644 --- a/source/_posts/en/Widgets.md +++ b/source/_posts/en/Widgets.md @@ -30,6 +30,9 @@ widgets: - position: left type: tags + order_by: -name + amount: + show_count: false - position: left type: followit @@ -234,6 +237,9 @@ widgets: - position: right type: tags + order_by: name # Optional. Order by tag name or length. Prefix with `-` to sort in descending order. + amount: 20 # Optional. The maximum number of tags to show. Leave empty to show all. + show_count: true # Optional. Whether to show post count right to tag name. {% endcodeblock %} diff --git a/source/_posts/zh-CN/CDN-Providers.md b/source/_posts/zh-CN/CDN-Providers.md index f28f108..3bc302e 100644 --- a/source/_posts/zh-CN/CDN-Providers.md +++ b/source/_posts/zh-CN/CDN-Providers.md @@ -38,12 +38,18 @@ Icarus为你提供了几种内置的CDN提供商来承载Icaurs所用到的第 - jsDelivr (`jsdelivr`) - UNPKG (`unpkg`) - loli.net (`loli`) + - BootCDN (`bootcdn`) + - 75CDN (`75cdn`) - **Web字体CDN** - Google Fonts (`google`) - loli.net (`loli`) + - font.im (`fontim`) + - 中国科学技术大学 (`ustc`) - **FontAwesome图标CDN** - FontAwesome 5 (`fontawesome`) - loli.net (`loli`) + - BootCDN (`bootcdn`) + - 75CDN (`75cdn`) 默认的CDN服务提供商配置为: diff --git a/source/_posts/zh-CN/Comment-Plugins.md b/source/_posts/zh-CN/Comment-Plugins.md index 0ae066d..da3e6fa 100644 --- a/source/_posts/zh-CN/Comment-Plugins.md +++ b/source/_posts/zh-CN/Comment-Plugins.md @@ -371,6 +371,24 @@ providers: {% endcodeblock %} +## Twikoo + +Twikoo是一个基于云函数的自建评论系统。 +不同于其他第三方评论服务,在Icarus中设置和使用Twikoo之前,你需要将它的后端部署到云环境上。 + +**安装指南** + +1. 按照[Twikoo文档](https://twikoo.js.org/),将Twikoo云函数部署到你指定的云服务商之上。 + +2. 将你部署的`env_id`填入主题设置中的对应设置项之中。 + + {% codeblock _config.icarus.yml lang:yaml %} + comment: + type: twikoo + env_id: xxxxxxxx + {% endcodeblock %} + + ## utterances
@@ -489,24 +507,23 @@ IP地址 ( - -
-
- 从GitHub的仓库中下载源码的压缩包并解压到你Hexo站点的主题目录中。 - 或者,你可以使用Git来克隆Icarus的代码仓库到`themes`目录下: +{% tabs align:left style:boxed %} + +从GitHub的仓库中下载源码的压缩包并解压到你Hexo站点的主题目录中。 +或者,你可以使用Git来克隆Icarus的代码仓库到`themes`目录下: - {% codeblock "Git Bash/命令行" %} - git clone https://github.com/ppoffice/hexo-theme-icarus.git themes/icarus -b --depth 1 - {% endcodeblock %} +{% codeblock "Git Bash/命令行" %} +git clone https://github.com/ppoffice/hexo-theme-icarus.git themes/icarus -b --depth 1 +{% endcodeblock %} - 你可以省略`-b `来获取Icarus的最新开发版本。 - 如果你想同时下载Git仓库的完整提交历史,请同时省略`--depth 1`。 - 另外,你也可以使用下面的命令将Icarus安装为Git子模块(submodule): +你可以省略`-b `来获取Icarus的最新开发版本。 +如果你想同时下载Git仓库的完整提交历史,请同时省略`--depth 1`。 +另外,你也可以使用下面的命令将Icarus安装为Git子模块(submodule): - {% codeblock "Git Bash/命令行" %} - git submodule add https://github.com/ppoffice/hexo-theme-icarus.git themes/icarus - {% endcodeblock %} -
+{% codeblock "Git Bash/命令行" %} +git submodule add https://github.com/ppoffice/hexo-theme-icarus.git themes/icarus +{% endcodeblock %} + - +{% codeblock "命令行" %} +npm install -S hexo-theme-icarus hexo-renderer-inferno +{% endcodeblock %} + +{% endtabs %}
diff --git a/source/_posts/zh-CN/Search-Plugins.md b/source/_posts/zh-CN/Search-Plugins.md index 5d37154..312a4f4 100644 --- a/source/_posts/zh-CN/Search-Plugins.md +++ b/source/_posts/zh-CN/Search-Plugins.md @@ -178,6 +178,7 @@ providers: {% codeblock _config.icarus.yml lang:yaml %} search: type: insight + include_pages: true # 可选项。设置为false时从搜索结果中排除所有page {% endcodeblock %} diff --git a/source/_posts/zh-CN/Upgrade-Guide.md b/source/_posts/zh-CN/Upgrade-Guide.md index d9acc83..c0d2fe7 100644 --- a/source/_posts/zh-CN/Upgrade-Guide.md +++ b/source/_posts/zh-CN/Upgrade-Guide.md @@ -19,6 +19,18 @@ toc: true +### 从4.x升级至5.x + +1. 将Node.js升级到12.4.0或者更新的版本。 + +2. 下载源代码或者从NPM安装Icarus 5.x。 + 你可以在{% post_link zh-CN/Getting-Started %}中找到安装指导。 + 如果你打算通过修改源代码的方式自定义主题,你必须从源代码安装主题。 + +3. 运行`hexo clean`来清理缓存并让Icarus为你升级主题配置文件。 + +4. 阅读[更新说明](https://github.com/ppoffice/hexo-theme-icarus/releases)和[最新文档](https://ppoffice.github.io/hexo-theme-icarus/categories/)来了解更多新功能的信息。 + ### 从3.x升级至4.x 1. 将Node.js升级到10.13.0或者更新的版本。 diff --git a/source/_posts/zh-CN/Widgets.md b/source/_posts/zh-CN/Widgets.md index beabd28..4c77907 100644 --- a/source/_posts/zh-CN/Widgets.md +++ b/source/_posts/zh-CN/Widgets.md @@ -233,6 +233,9 @@ widgets: - position: right type: tags + order_by: name # 可选项。按名称(name)或长度(length)来排序。加上`-`前缀来倒序排列。 + amount: 20 # 可选项。最多显示的标签数量。留空以显示所有标签。 + show_count: true # 可选项。是否显示标签名称右侧的文章数量。 {% endcodeblock %}