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
Theme CSS missing crossorigin="anonymous" #96
Comments
What's your use case that you end up deploying one build on multiple URLs? |
I am deploying my personal site to |
Interesting use case. But isn't simpler if you just redirect every other address to a main one? Anyway, thanks. |
Yes, perhaps, I am investigating that now. But thought this change was warranted regardless, to at least make the CSS links consitent. Thanks for merging. |
Although I think this approach is not a good idea, specially that it confuses search engines as well as users, and also it reduces the overall SEO score (which on a personal site might not be that relevant) but I agree with @luizdepra to pick one to be the source of truth and redirect every combination of .net, .org, with or without If you still want to keep the same setup I still don't know how you proceed with selecting one resources to be the source of css files. How other sites are going to reference to it? How did you build the site for other setup in the first place? The very first thing I was thinking about when you opened the issue was to generate the site multiple times with passing additional base URL flag:
but this still doesn't solve for with and without Anyway, addition of this PR is super awesome but I believe your setup can be improved. |
Absent my particular example of multiple top level domains, you still have the common situation of |
Yes, I totally agree on that part. |
If you run the same hugo deploy on multiple URLs like I do then you run into this problem where the theme style sheet can't be loaded. The stylesheet link tag as the integrity attribute which is great, but is missing the
crossorigin="anonymous"
. You will see the other stylesheets that have integrity have that attribute. It only really matters that it is missing when the URL of the page is not the same domain as the theme stylesheet URL, which in my case does happen. Pull request for fix on the way.The text was updated successfully, but these errors were encountered: