Closed jdhao closed 7 years ago
The different output of hexo g
and hexo server
is a known issue that we are trying to fix. https://github.com/hexojs/hexo/issues/2503
I believe the case issue is caused by git: https://stackoverflow.com/questions/3011625/git-mv-and-only-change-case-of-directory . In a case-insensitive environment, git won't pick up the case change. You could try the solution provided in the link.
For later reference, the reason is indeed that git ignores the change of name cases. A workaround is to change the category or tag name to other names, deploy it to github. Change the name back to your desired name and deploy again.
Environment Info
Node version: v6.10.0
Hexo and Plugin version:
For BUG
BUG description
When you change the case of categories or tags names associated with a post and deploy it to github. The change won't take effect.
The way to reproduce
I write a post, give it category name "Linux", then use
hexo d -g
to deploy it to github pages, everything works fine. Later, I want to change the case of category name, for example, if I change it to 'linux' or 'LINUX' (whatever as long as only the character case changes), clean the current buildhexo clean
, then deploy again usinghexo d -g
. You will find that this change won't take effect: in the categories or tags page of my blog, the new category or tag name is shown. When you click the new category or tag name, you will not see a list of post linked but get 404 not found error.If you only preview the new change using
hexo s -g
, everything works fine: the new change of name case takes effect and works as expected.I checked the github pages repo after deployment and found that the new change of name case is not reflected on github. Under the folder categories or tags , old names are still shown. However, in my local machine (a Windows 8.1 computer), in the same folder, the new name is shown. I think this may be the reason but do not know how to solve it.
I have searched the hexo issues and found one about capitalizing issue #1693. But on my machine, I have set
filename_case
to its default 0.Log with hexo d -g --debug