记录一下配置 Icarus 这个主题的过程。
安装
终端 cd
进 hexo 的根目录。
1 | $ npm install hexo-theme-icarus |
还有种从源码安装的方法,可以参考官方文档 - Icarus快速上手
配置
编辑 _config.icarus.yml
进行配置。
个人配置
修改 CDN
编辑 _config.icarus.yml
,修改 providers
:
1 | providers: |
去除文章更新时间
在 themes/icarus/layout/common/article.jsx
里找到 Last Update Date
注释掉以下部分:
1 | {shouldShowUpdated && <span class="level-item" dangerouslySetInnerHTML={{__html: _p('article.updated_at', `<time dateTime="${date_xml(page.updated)}" title="${new Date(page.updated).toLocaleString()}">${date(page.updated)}</time>`)}}></span>} |
添加备案号
在 themes/icarus/layout/common/footer.jsx
里找到以下字段:
1 | <a href="https://github.com/ppoffice/hexo-theme-icarus" target="_blank" rel="noopener">Icarus</a> |
在后面直接添加,譬如:
1 | <a href="https://github.com/ppoffice/hexo-theme-icarus" target="_blank" rel="noopener">Icarus</a> 粤ICP备2021079776号 |
相关链接
本文作者:Kiro