大家好,我申请了一个域名,然后用hexo生成静态页面并部署到github。
然后我的域名要定向到github上必须在xxx.github.io仓库的根目录添加一个文件CNAME,其中内容是我申请的域名。
但是莫名其妙的是
每次执行hexo g和hexo d之后,这个CNAME的文件都被删除掉了...导致我无法通过域名访问github page..
求助......
Create a new CNAME file in the source folder and write the domain name into it, and then hexo g和hexo d
hexo g
hexo d
Make sure you add the CNAME in the hexo的source directory, so that the CNAME will be generated in the root directory of the warehouse every time you build.
hexo
source
The person above is right, because it regenerates and redeploys the files every time
Create a new CNAME file in the source folder and write the domain name into it, and then
hexo g
和hexo d
Make sure you add the CNAME in the
hexo
的source
directory, so that the CNAME will be generated in the root directory of the warehouse every time you build.The person above is right, because it regenerates and redeploys the files every time