DevOps Hexo分类标签中关于大小写的bug

soledad12306 · January 15, 2020 · 60 hits

1.描述

当我的分类标签写的是Scrapy时,打开我的博客找到Scrapy标签,点击Scrapy却出现404页面。
当我把标签改为scrapy小写,再发布到网上,点击scrapy就不会出现404问题。
后来发现原来是git标签生成时忽略了大写,生成的实际标签为scrapy。
于是我来到我的Github中,找到Gladysgong.github.io/categories/爬虫/这个目录,发现实际生成的也是scrapy,所以
原因就在这里了。

2.解决

修改文件:
    cd blog/.deploy_git
    vi .git/config
    将ignorecase=true改为ignorecase=false
删除Gladysgong.github.io中的文件并提交:
    git rm -rm *
    git commit -m "clean all files"
    git push
Hexo再次生成及部署:
    cd ..
    hexo clean
    hexo g
    hexo d
No Reply at the moment.
You need to Sign in before reply, if you don't have an account, please Sign up first.