Installation

How to install and use the hexo-theme-solitude theme.

Install Hexo

If you haven't installed Hexo yet, please install it first. You can refer to the Hexo official documentation for installation instructions.

Install the Theme

CD into the Project Directory

cd [project-name]

Install the Theme

There are numerous ways to install the theme—simply choose the method you prefer. If you find these instructions unclear, using the first method by default is recommended.

  1. Install Using Git
git clone -b dev https://github.com/everfu/hexo-theme-solitude.git themes/solitude
  1. Manual Installation via Theme Files

Download the latest release version. Unzip it into the themes directory, then rename the extracted folder to solitude

File Structure Reference

  1. Install Using Package Manager
npm
pnpm
bun
yarn
npm i hexo-theme-solitude

Configure the Theme

Edit the _config.yml file in your Hexo project and add the following content:

theme: solitude

Install Dependencies

npm
pnpm
bun
yarn
npm i hexo-renderer-pug

Start Hexo Locally

Run the following commands:

hexo clean
hexo generate
hexo server

Copy Theme Configuration to Blog Root Directory (Optional)

To minimize inconvenience after theme upgrades, you can copy the contents of the _config.yml file from the theme directory to your blog's root directory and rename it to _config.solitude.yml.

NPM Installation

Mac/Linux
Windows
cp -rf ./node_modules/hexo-theme-solitude/_config.yml ./_config.solitude.yml

Git Installation

Mac/Linux
Windows
cp -rf ./themes/solitude/_config.yml ./_config.solitude.yml

The configuration in _config.solitude.yml in your blog's root directory takes precedence over the _config.yml file in the theme directory. If you use _config.solitude.yml, corresponding configurations in the theme's _config.yml will not take effect.

When updating the theme, remember to check if the configuration file has changed. Release notes typically highlight changes or provide a diff comparison of configuration file versions. Simply synchronize these changes to your configuration file.

File Structure Reference