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
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.
- Install Using Git
- 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
- Blog Directory/
- themes/
- solitude/
- Install Using Package Manager
Configure the Theme
Edit the _config.yml
file in your Hexo project and add the following content:
Install Dependencies
Start Hexo Locally
Run the following commands:
Visit http://localhost:4000 to view your blog.
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
Git Installation
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.
Note:
You are copying the theme's _config.yml
, not Hexo's _config.yml
.
Do not delete the _config.yml
file in the theme directory.
File Structure Reference
- _config.solitude.yml