In the git pages on GitHub, the css style failure problem occurred after deployment|Solved

In the git pages on GitHub, the css style failure problem occurred after deployment|Solved

First of all, each git warehouse can create a git pages, and you can set the deployment information in the pages. You
only need to put your file with index.html in the root directory of a branch, and it can be deployed and accessed

After deploying again today, there is a problem that the github style is invalid

Reason analysis: the files under the path
uploaded to github using the html automatically generated by sphinx
_static/css/cannot be loaded.
This is because the jekyll template of github pages ignores files beginning with an underscore, so jekyll should be disabled

Solution:

只需要“在项目根目录下添加一个空白文件,命名为:.nojekyll”
内容都不用填写,这样在部署的时候,git page会自动识别,并且禁用jekyll

insert image description here
After adding the file, the upload needs to ensure that there is such a file in the corresponding location:
insert image description here
in this way, the deployment can be completed and the access can be successful! ! !
insert image description here
Successful visit! ! !

respect!!!

Guess you like

Origin blog.csdn.net/qq_41725313/article/details/127681901