Incomprehensible bug in my GitHub-Page

一笑奈何 提交于 2019-12-24 09:42:00

问题


First, I apologize for posting this here because I imagine it's not in the right place ...: / Here, I have a git repository on which I have a personal project, I had a little abandoned and then I plunge on it. Until now I had never had a problem but since today I have the following error:

Refused to load the image 'https://monrepo.github.io/favicon.ico' because it violates the following Content Security Policy directive: "img-src data:".
Failed to load resource: the server responded with a status of 404 (Not Found)

The problem comes (normally?) not from my code because locally I have no worries so I imagine there is a trick that blocks on the github side but what ?!

Thanks for your help! =)


回答1:


Alright, it was just an inattention mistake. Before it was necessary to have a dedicated branch gh-pages but now the master branch (or any other branch) can be chosen to be the gh-page. Simply have to select it in the repository settings...




回答2:


If the username differs from the repository name User/MyRepository then you have to go to the repository settings and mark GitHub Pages explicitly to publish it.

If your name matches the user then you dont need to explicitly publish it, but its done automatically considering "*.github.io".

So the format for automatic publishing is: User/User.github.io



来源:https://stackoverflow.com/questions/42909603/incomprehensible-bug-in-my-github-page

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!