Note
This article was automatically translated using Google
In the past few days, I have focused on updating articles, and suddenly found that hexo g
displayed a highlight error, because I have been submitting to git to automatically generate articles before, so I have not checked the log carefully
The main reason is that it only reports a warning when it is generated, and it does not affect the use. This time I found out that I wanted to adjust the theme style, so I need to upgrade the plugin (it has not been upgraded for almost a year, and my hexo version is still 5.4, now 6.3)
Upgrade hexo and plugins
There are many ways to upgrade node and npm on the Internet, just search for it
- Check the hexo version:
hexo version
- Global upgrade:
npm i hexo-cli -g
- Navigate to the hexo directory
- Check plugin:
npm-check
- You can manually upgrade according to the prompt, or directly:
npm-upgrade
+npm update --save
- Check the version number again to confirm:
hexo version
Check if the modified place is overwritten
There is no problem with the upgrade itself, but when using it, because I don’t like to write comments, I may manually modify some plug-ins and forget it. This time, it will be overwritten after the upgrade.
There are two main system plug-ins I changed:
hexo-generator-index As mentioned in the article, I removed several categories from the homepage. If I don’t modify them, the paginated pages still contain articles of this category, which will cause the number of articles on the page to be incorrect.
hexo-generator-category
, I also changed this, but I forgot it completely, which caused a problem with the sorting in my novel category. I found the reason by directly modifying and comparing with git, sweating…
1 | ; |
Hurry up and manually record the upgrade process, save it and forget about it when you upgrade later, the final display effect is very good
Remaining problem
In fact, there is still a remaining problem, which is the context address of the article. This address seems to have been created when the system paginated or even earlier, and the original logic is no problem. But I want him to generate three different context-corresponding addresses based on the three categories of essays, experiences, and novels
That is to say, the context of the articles in my essays will not point to the articles in the experience. At present, it is sorted by time globally. This should also find the place to modify, but let’s talk about it in two days.