delete_remaining_tags
删除旧博客残留tags
recently I start to write new blogs, due to the inspiration of Ruan Yifeng.
And I want to change my theme from butterfly to NexT.
I start the work on the night of October 8th. What I did is
- download
NexT
from github - change the
_config.yml
file in root path, frombutterfly
toNexT
and it works after I usehexo clean
andhexo g
- copy the
_config.yml
file inthemes/NexT
to_config.next.yml
in root path.
However, I found that the old tags are still there. Tags are suppose to be deleted after the blog is deleted. But things are not that simple.
I check all the customized setting in my folder.
- not every blog writter create a
_config.<theme_name>.yml
file in the root path. - I change the theme, maybe it is relate to existing theme config in butterfly.
- If the remaining_tags have something to do with the source code, searching the tags name in the workspace is a good way.
For first, it is irrelevant influencing factors. For second nothing changed after I switch back to butterfly
for third, I could not find the tags name in the workspace.
So I think it maybe something relate to website cache.
- delete most of the post in
source/_posts
- delete folder
public
- delete all files on GitHub repository
- delete
db.json
as GPT suggested. - delete
node_modules
- regenerate the tags and categories by
hexo new page tags
andhexo new page categories
- delete all the tags and categories in
source/_posts
- create this post to test.
日期:2024年10月10日16点33分更新,可能清除public
folder and .deploy
即可
It occurred a problem that the tags and categories and tags change from 6 to 7 due to my new tag prose. And both categories and tags are unclicable button on the website.
在 Hexo 博客的 Next 主题中,分类和标签按钮不可点击的可能原因有以下几种:
主题配置错误:检查 _config.yml 文件中的相关配置,确保分类和标签的设置正确。
数据源问题:确保你的文章确实有分类和标签。没有任何分类或标签的文章可能导致按钮无法显示。
A rediculous mistake: all the hexo clean
have been typed as hexo clear
make it no use
After revice that I checked hexo --config
as instruction it gave.
it gave me error message as follow
1 | 62589@DESKTOP-OQLQ1BU MINGW64 /d/Desktop/hexo_blog |
So I tried to delete node_modules
and npm install --force
then the error message changed to some render mistake
$ npm uninstall hexo-renderer-swig
seems that swig is not supported anymore and as Copilot suggested I tried to change to nunjucks npm install hexo-renderer-nunjucks --save
no use, then as terminal message said, I tried to run
npm audit fix --force
It worked to a certain degree. And the number of categories and tags are correct now. But it is still not clickable.
Then as Copilot suggested, I reinstall the theme NexT. And my website finally - broken. It have some problem with _config.next.yml
because some costomized setting in various file.
1 | FATAL Something's wrong. Maybe you can find the solution here: https://hexo.io/docs/troubleshooting.htm |
What I learn is that never getting too deep into something you do not know.
I reinstall Hexo to make sure the _config.yml
is not polluted, and not planing to make any costomized setting if not neccessary.
After it is a blog, I will frist focus on the content.