Skip to content
本页目录

安装主题

在使用 Keep 主题之前,如果你对 Hexo 搭建个人博客没有任何经验,建议你可以先简要阅读 「 Easy Hexo 团队 」撰写的 Hexo 教程,能帮助你快速入门 Hexo。

安装

  • 如果你在使用 Hexo 5.0 或更高版本,最简单的安装方式是通过 NPM (推荐)

    sh
    $ cd hexo-site
    $ npm install hexo-theme-keep
    
  • 或者使用 Git 克隆整个仓库

    sh
    $ cd hexo-site
    $ git clone https://github.com/XPoet/hexo-theme-keep themes/keep
    

使用

Keep 主题安装完成后,在 Hexo 配置文件 _config.yml 中将 theme 设置为 keep

yaml
theme: keep

注意

使用 Keep 主题必须确保你的 Node.js 版本 >= 14.0,当你的 Hexo 项目运行时报错或发出警告,请注意升级你的 Node.js 版本。

更新

Keep 主题不定期发布新版本,你可以通过如下命令更新。

  • 通过 NPM 安装最新版本 (推荐)

    sh
    $ cd hexo-site
    $ npm install hexo-theme-keep@latest
    
  • 通过 Git 更新到最新的 master 分支

    sh
    $ cd themes/keep
    $ git pull
    

Released under the AGPL-3.0 License