让 Icarus Insight 搜索插件支持拼音检索文章
活用 Bulma 美化 Icarus 文章

活用 Bulma 美化 Icarus 文章

Icarus 相信大家都很熟悉,但是有时候我们希望在文章中用特别的样式注明一些内容,markdown 语法就不够用了,所以 Icarus 有哪些高级玩法呢?下面就让 iMaeGoo 带大家一起了解吧。(误

TOC

  1. 按钮
  2. 进度条
  3. 标签页
  4. 彩色突出
  5. 点击展开代码
  6. 你知道的太多了
  7. 让简介不出现在正文
  8. 封面图来源声明
阅读更多

Icarus 夜间模式支持 3.0 了

原主题
Icarus 夜间模式(实验中)
如何给 Icarus 增加夜间模式

夜间模式单独提取的代码目前已经更新,支持 Icarus 3.0.0,有需要的朋友欢迎 checkout。

分支:https://github.com/imaegoo/hexo-theme-icarus/tree/night3
提交:https://github.com/imaegoo/hexo-theme-icarus/commit/fc3d016ae1c999347bd9ecbf3cc656e1382db06d

1
2
3
4
cd theme/icarus
git remote add imaegoo https://github.com/imaegoo/hexo-theme-icarus.git
git fetch imaegoo
git merge imaegoo/night3

hexo-theme-icarus 3 食用经验分享

昨天晚上 Icarus 主题的 RC 版本发布,离正式版不远了,我自 3.0.0-beta.1 一路使用到现在,把自己的使用经验分享一下。

魔改迁移

由于主题作者换掉了 ejs 语言,全部重写了一遍,迁移这块的难度是最大的。

拉 dev 分支,冲突实在是太多了,我的办法是,把在旧版上的魔改的整个 diff 导出,然后直接从 dev 签出一个新的分支,参考 diff 对每个文件都重新修改,花了不到2个小时搞定。

魔改 hexo-component-inferno 组件

主题中部分可重用的 JS 和 JSX 代码已经被移到另一个项目 hexo-component-inferno 中,我们如何对这些组件魔改?此时要分2种情况——

  1. widgets 的魔改
  2. 其它 JS 和 JSX 的魔改
阅读更多

如何给 Icarus 增加夜间模式

此篇针对 Icarus 2 版本,Icarus 3 请参考:Icarus 夜间模式支持 3.0 了

Preview

Live Preview

https://www.imaegoo.com/

Attention

This extension is NOT FULLY TESTED, so it may not fully cover the theme styles, if you find something wrong (such as bright things in night mode), please report it in this issue, do not open new issue.

Usage

  1. Merge night branch from imaegoo/hexo-theme-icarus into your icarus theme folder, or dowmload zip.
  2. If you configured an image logo, you should prepare a logo for night mode, then apply them in themes/icarus/_config.yml.
    1
    2
    3
    logo:
    light: /images/logo.png
    dark: /images/logo-dark.png

  1. night 分支(imaegoo/hexo-theme-icarus)合并到你的主题分支中。如果你不懂,并且你对主题没有自己修改,直接下载修改好压缩包
  2. 如果你的网站 LOGO 是图片,你可能需要准备一黑一白两个版本的 LOGO,并在主题 themes/icarus/_config.yml 中配置。
    1
    2
    3
    logo:
    light: /images/logo.png
    dark: /images/logo-dark.png

Modify

If you want to customize your theme, you can modify night mode part in themes/icarus/source/css/style.styl.

Thanks

Universe background from https://github.com/fan-lv/Fan

Icarus 夜间模式(实验中)

更新了 Icarus 主题代码,右上角增加了夜间模式切换按钮,是实验中的功能,欢迎体验。

通过向 body 添加名为 night 的 class 实现,状态记在浏览器 localstorage 中。

已知问题:

  1. 样式可能没有全面覆盖。
  2. 夜间模式在低性能浏览器上导致页面响应缓慢,需要优化性能。

目前还没有做成插件,仅在自己的博客使用,后期如果有时间的话,会考虑做成 extension。


更新:已经发布了——

Icarus 2 请参考:如何给 Icarus 增加夜间模式
Icarus 3 请参考:Icarus 夜间模式支持 3.0 了