Github Pages Reload Issue

I have a github pages site set up at https://www.jeremybrachle.com/ and it works really well for the most part. The only problem I have is when I go to a page other than home (for example: https://www.jeremybrachle.com/about) and click reload, I get an error on the console saying “Refused to load the image ‘https://www.jeremybrachle.com/favicon.ico’ because it violates the following Content Security Policy directive: “img-src data:”.” and the browser displays a 404 error. I was able to get it to work by using the hash location strategy, but I don’t want hashes displayed in my URL when navigating to different pages. Is this something I could get to work with a Jekyll plug in?

Hi @jeremybrachle,

This post was moved to a different board that fits your topic of discussion a bit better. This means you’ll get better engagement on your post, and it keeps our Community organized so users can more easily find information.

As you’ll notice, your Topic is now here in the GitHub Pages board. No action is needed on your part; you can continue the conversation as normal here.

Cheers!

1 Like

Taking a look at your source at https://github.com/jeremybrachle/jeremybrachle.github.io, it appears that you’ve built an Angular site? What you’ve done is you’ve created routing handlers for the various header links (about, experience, and contact) but no actual pages for those. So when you click the “About” link in the header on the home page, the Angular code does some JavaScript magic to render the about page and make it look like you’ve navigated to another page … but the page doesn’t exist except in the memory of the browser. So when you click reload, the browser faithfully attempts to load https://www.jeremybrachle.com/about and the webserver accurately responds with a 404, because that page doesn’t, in fact, exist.

What you would have to do is perhaps create an about.html that loads your Angular app and renders the “about page” template you have. The same would have to be done for the other pages.

I hope that helps!

1 Like