-
-
Notifications
You must be signed in to change notification settings - Fork 191
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
Cannot load stylesheet, Failed integrity metadata check #180
Comments
I think this issue might have to be reopened.
So, instead of $eurekaCSS.Permalink, use $eurekaCSS.RelPermalink | absLangURL? You can read more about this here: What do you think wangchucheng? |
What is your "tried to change to "? It seems that something were missing. I did not test what would happen if the site were hosted in different domains, so you may be true and I will have a look at it later. |
Sorry, I posted code directly, I didn't pay attention. I am not use to comment on GitHub. ` {{- $eurekaJS := resources.Get "js/eureka.js" | resources.ExecuteAsTemplate "js/eureka.js" . | minify | fingerprint "sha384" }} <script defer src="{{ $eurekaJS.RelPermalink | absLangURL }}" integrity="{{ $eurekaJS.Data.Integrity }}"></script>` |
This is a similar problem. I hesitate whether I should open a second ticket or not. I will let you decide. Last night, I launched the first 2 but not the third one. The baseURL is set per language. Furthermore, I 1 distinct repo per hostname so that the Chinese version is hosted in China. The French version is hosted in France. The English version is hosted in the United States. There are multiple reasons why I decided to follow such a setting and I am not going to enter into too much details now. So, after I launched the first 2 websites, the picture on the front page didn't load because it was trying to download the picture from Denise-Bauer.United-States-of-America.eu rather than Denise-Bauer.Meiguo.eu or Denise-Bauer.Etats-Unis.eu. I am not sure if it's a bug or a mistake I made when I configure the website, but I believe it's in the same vein as the problem I previously mentioned. What do you think? |
UPDATE: if in layouts/partials/head.html
I change $eurekaCSS.Permalink
To $eurekaCSS.RelPermalink | absLangURL
It seems to work.
It might be related to Hugo: gohugoio/hugo#8109
Here is what my languages.yaml looks like:
en:
languageCode: en
languageName: English
title: Nicholas Burns (non-official)
contentDir: content/en
baseURL: 'https://nicholas-burns.united-states-of-america.eu'
fr:
languageCode: fr
languageName: French - Français
title: Nicholas Burns (non officiel)
contentDir: content/fr
baseURL: 'https://nicholas-burns.etats-unis.eu'
zh:
languageCode: zh
languageName: Chinese - 简体中文
title: Nicholas Burns (非官方网站)
contentDir: content/zh
baseURL: 'https://nicholas-burns.meiguo.eu'
Describe the bug
When I visit
https://nicholas-burns.united-states-of-america.eu
the page loads normally. The stylesheet is properly loaded from this link:
https://nicholas-burns.united-states-of-america.eu/css/eureka.min.6a378a23360d238dc3ef4df2f5cd718093f02c10c9c7eb2437c29701cd8d389ab6da5d9f21bdd3afa305fd56c1235017.css
But if I visit the French version of the website
https://nicholas-burns.etats-unis.eu
it fails. It cannot load the stylesheet due to a failed integrity metadata check. I noted that it also points to this link:
https://nicholas-burns.united-states-of-america.eu/css/eureka.min.6a378a23360d238dc3ef4df2f5cd718093f02c10c9c7eb2437c29701cd8d389ab6da5d9f21bdd3afa305fd56c1235017.css
Expected behavior
If I visit the French version, it should point to the correct baseURL as defined in languages.yaml which is https://nicholas-burns.etats-unis.eu for the French version.
Screenshots
Environment
The text was updated successfully, but these errors were encountered: