-
-
Notifications
You must be signed in to change notification settings - Fork 364
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failed to find a valid digest in the integrity
attribute
#114
Comments
@albilaga Glad you like the theme. On the site site I can't see an integrity error. It would be interesting to know, which script caused the error. Do you have a more complete log? From a security point of view, it's not advisable to remove the integrity check, especially for content hosted on a CDN. This error reminds me a lot of this issue #64, however, it seemed to be resolved by new. Somehow this issue seems very specific to GitHub Pages, I have never seen it on Netlify or anywhere else. |
Yes. I don't have error now because I remove the integrity. This is the part where I remove the integrity
I changed the integrity to |
I have the same issue |
This is an issue commonly reported on other themes too. Basically, would you need to ensure the line endings stay the same. Check out this documentation. Could you please give this a try? Unfortunately, I can not reproduce the problem on my setup. |
Hmm, I completely remove theme, executed |
@lxndrblz yes. Looks like that is the issue. Thank you... |
I have the same issue. And I am using Windows. I try the solution provided by @gofort , executed
|
I found this related issue. Whatever I will try to use WSL to generate the blog again to check is a Hugo-on-Windows bug. ----update---- And, I found another interesting thing. If I rerender the blogs and push to the github. Within 10 minutes the blog displays everything fine, but after a while (maybe half an hour) my blog goes white and loses all css with the error. |
Hi guys. If you are using your own domain name. I think I may have solved this problem.
I was suffering from this problem for a long time. By checking everyone's solutions, neither my reinstallation of the theme nor changing the git related settings solved the problem. So, I shifted my focus. I had always suspected that there was a problem with the resource itself, so if it weren't a problem with it, it could be a problem with the browser fetching the resource. PS: This also solved my confusion that why every time my blog was just pushed to the Github Page everything was fine, but half an hour later there was an error. |
Hi all, I encountered this issue, building on Windows, and deploying to GitHub pages. The site displayed fine with the Hugo server locally, but would break with this error when published and viewed on github.io. I believe it's due to the CR/LF line endings on Windows causing the checksums to be different. Specifically for me, I narrowed it down to the fontawesome css files in "assets\fontawesome\css".
The best solution I have found so far, If you are building your Hugo site on Windows, in your .github.io GitHub Pages repository, add a .gitattributes file that requests CSS files be checked out with CR/LF line endings with the line |
If you deployed hugo generated website with cloudflare, you may encounter CSS or JS integrity issues. Found this solution. Works for me. https://stackoverflow.com/questions/65040931/hugo-failed-to-find-a-valid-digest-in-the-integrity-attribute-for-resource Try to turn off Auto Minify feature for CSS or JS because cloudflare may change your CSS or JS files. As they documented.
|
keeping |
Hello. First of all thank you for this beautiful theme.
I have some issues when I try to deploy the theme to github pages. When I deploy I got error message
Failed to find a valid digest in the 'integrity' attribute for index.html:1 resource 'https://....' with computed SHA256 integrity '.....'. The resource has been blocked.
Right now I am following this solution https://stackoverflow.com/a/65052963/1351913 and I edited in
themes/anatole/partials/head.html
and remove integrity in there and it is working fine. But maybe if there is another solution for this?The text was updated successfully, but these errors were encountered: