Skip to main content

Installation

Prerequisites​

If you're new to these, start with the Hexo docs.

Choose an Installation Method​

Both methods are functionally equivalent — pick whichever fits your workflow:

MethodBest forDependenciesUpgrade
npm install (Recommended)Most usersAuto-installednpm install hexo-theme-tranquility@latest
Git cloneHacking the source / tracking mainManualgit pull

1. Install the theme​

Runtime dependencies (hexo-pagination, moment, opentype.js, etc.) are installed automatically with the theme:

cd hexo
npm install hexo-theme-tranquility

2. Enable the theme​

Set the theme field to tranquility in your blog's root _config.yml (see Themes | Hexo):

theme: tranquility

3. Remove conflicting dependencies​

hexo-generator-category and hexo-generator-archive conflict with this theme's "Subpage" design and must be removed (npm cannot uninstall other packages automatically):

npm uninstall hexo-generator-category hexo-generator-archive

4. Theme configuration​

Create _config.tranquility.yml in your blog's root directory with only the options you want to override — the rest fall back to the in-package defaults (Hexo deep-merges them).

See the Configuration Overview or read the comments in the theme repo's _config-template.yml.


Option B: Install via Git Clone​

1. Clone the theme​

Clone this repository into your Hexo blog's themes/tranquility folder:

cd hexo
git clone https://github.com/zycwer/hexo-theme-tranquility.git themes/tranquility

2. Enable the theme​

Set the theme field to tranquility in your blog's root _config.yml (see Themes | Hexo):

theme: tranquility

3. Remove conflicting dependencies and install required ones​

npm uninstall hexo-generator-category hexo-generator-archive
npm install hexo-pagination moment opentype.js

hexo-generator-category and hexo-generator-archive conflict with this theme's "Subpage" design and must be removed.

4. Theme configuration​

Copy themes/tranquility/_config-template.yml to your blog's root directory and rename it to _config.tranquility.yml:

cp themes/tranquility/_config-template.yml _config.tranquility.yml

Personalize the theme by editing _config.tranquility.yml. See the Configuration Overview or read the comments in the config file.


Verify​

hexo clean && hexo s

Open http://localhost:4000 in your browser — the theme homepage means the installation succeeded.


Troubleshooting​

Reading error messages helps locate issues quickly.

Missing dependencies​

As the theme evolves, it may depend on more third-party modules. Users need to add new dependencies themselves. For example:

...
Error: Cannot find module 'a_third_module'
...

The message clearly indicates the a_third_module module is missing — just install it:

npm install a_third_module

See npm-install | npm Docs.


Next Steps​