Currently, it is not smooth to update NexT theme from pulling or downloading new releases. It is quite often running into conflict status when updating NexT theme via
git pull, or need to merge configurations manually when upgrading to new releases.
At present, NexT encourages users to store some options in site config file (
hexo/_config.yml) and other options in theme config file (
next/_config.yml). This approach is applicable, but has some drawbacks:
- Configurations are splitted into two pieces
- Users may be confused which place should be for options
In order to resolve this issue, NexT provides the following two solutions.
With this way, all your configurations locate in main site config file.
You don't need to edit theme config file or create any new files.
But you need to keep up indentation within
If there are any new options in new releases, you just need to copy those options from theme config file, paste into site config file and set their values to whatever you want.
- Please confirm that the
/source/_data/next.ymlfile does not exist (delete it if exists).
- Copy needed NexT theme options from theme config file into site config file, then
2.1. Move all this settings to the right with two spaces (in Visual Studio Code: select all strings, CTRL + ]).
theme_config:parameter above all this settings.
- Hexo Configuration
- Hexo Pull #757
With this way, you can put all your configurations into one place (
You don't need to edit theme config file (
But option may not accurately procces all Hexo external libraries with their additional options (for example,
hexo-server module options may be readed only in default Hexo config).
If there are any new options in new releases, you just need to copy those options from theme config file, paste into
hexo/source/_data/next.yml and set their values to whatever you want.
- Please ensure you are using Hexo 3 (or above).
- Create a file named
_datadirectory if it does not exist).
- Then, in main site config file need to define
theme: nextoption (and if needed,
- Use standart parameters to start server, generate or deploy (
hexo clean && hexo g -d && hexo s).