Go to Hexo dir
Change dir to site root directory. There must be node_modules
, source
, themes
and other directories:
1 | $ cd hexo |
Get NexT
Download theme from GitHub. There are 3 options to do it, need to choose only one of them.
Option 3: Download Latest Master Branch
May be unstable, but includes latest features. Recommended for advanced users and for developers.
1 | $ git clone https://github.com/theme-next/hexo-theme-next themes/next |
This variant will give to you the whole repository (with .git
directory inside).
And in any time you can update current version with git (instructions below) and switch to any tagged release or on latest master or any other branch.
At most cases useful as for users and for developers.
Get tags list:
1 | $ cd themes/next |
For example, you want to switch on v6.0.1
tagged release version. Input the following command:
1 | $ git checkout tags/v6.0.1 |
And if you want to switch back on master branch, input this command:
1 | $ git checkout master |
Update
You can update to latest master branch by the following command:
1 | $ cd themes/next |
And if you see any error message during update (something like «Commit your changes or stash them before you can merge»), recommended to learn Data Files feature.
Howbeit, you can bypass update errors by Commit
, Stash
or Discard
local changes. See here how to do it.
1 | $ mkdir themes/next |
Same as before under curl & tar & wget
variant, but will download only latest master branch version.
At some cases useful for developers.
Option 2: Download Tagged Release Version
In rare cases useful, but not recommended.
You must define version. Replace v6.0.0
with any version from tags list.
1 | $ git clone –branch v6.0.0 https://github.com/theme-next/hexo-theme-next themes/next |
This variant will give to you the defined release version (with .git
directory inside).
And in any time you can switch to any tagged release, but with limit to defined version.
1 | $ mkdir themes/next |
Same as before under curl & tar & wget
variant, but will download only concrete version.
Option 1: Download Latest Release Version
At most cases stable. Recommended for beginners.
1 | $ mkdir themes/next |
This variant will give to you only latest release version (without .git
directory inside).
So, there is impossible to update this version with git
later.
Instead you always can use separate configuration (e.g. Data Files) and download new version inside old directory (or create new directory and redefine theme
in site config file), without losing your old configuration.
Set it up
When NexT download will complete, we must go back to previous guide and follow Enabling NexT instructions.