Skip to content

Installation

Ben Wong edited this page Dec 26, 2017 · 6 revisions

Install & Update

Here are two ways to install the theme.

Notice: You should enable the theme after installation, which means editing the _config.yml in blog root, finding theme: and changing it into theme: anatole.

Using Zip (For Stable Ver.)

Click Release, download Source code (zip), unzip it in /themes of your blog root, rename the folder hexo-theme-Anatole-1.* to anatole. Steps to update are similar to them above, remember that you should keep your modification on your own.

Git Clone (For Beta Ver.)

On this way, you can follow the latest feature of the theme. cd folder /themes of your blog root, then

git clone https://github.com/Ben02/hexo-theme-Anatole.git themes/anatole

When update, use (in /themes)

cd anatole
git pull

Required Plugins

npm install --save hexo-render-pug hexo-generator-archive hexo-generator-tag hexo-generator-index hexo-generator-category

Edit _config.yml in your blog root, add (If some lines similar are in, please change them.)

archive_generator:
  per_page: 0  
  yearly: false
  monthly: false
  daily: false

per_page: 0 sets the number of items in archives, number 0 means no limit.


安装和更新主题

这里介绍两种安装和更新主题的方法。

注意:安装完成后需要启用主题,请编辑 Hexo 部署目录内的 _config.yml, 找到 theme: 并把那一行改成 theme: anatole

压缩包安装(适用于稳定版)

进入 Release 页面,下载压缩包,解压到 Hexo 部署目录下的 /themes 文件夹内,并把类似 hexo-theme-Anatole-1.* 的文件夹名改为 anatole。更新时步骤也相似,注意自行保留对主题的更改。

克隆安装(适用于测试版)

本方法可以及时跟进主题的新功能。命令行下进入 Hexo 部署目录下的 /themes 文件夹内,使用以下命令即可安装。

git clone https://github.com/Ben02/hexo-theme-Anatole.git themes/anatole

更新时使用以下命令(在 /themes 内):

cd anatole
git pull

安装和配置必要插件

npm install --save hexo-render-pug hexo-generator-archive hexo-generator-tag hexo-generator-index hexo-generator-category

编辑 Hexo 部署目录内的 _config.yml,新增以下条目(若已有类似条目请自行修改):

archive_generator:
  per_page: 0  
  yearly: false
  monthly: false
  daily: false

per_page: 0 处指定文章归档页面的条目数,0 为无限制。