diff --git a/layouts/partials/lang-detection.html b/layouts/partials/lang-detection.html index d7de209..a196a20 100644 --- a/layouts/partials/lang-detection.html +++ b/layouts/partials/lang-detection.html @@ -1,7 +1,9 @@ {{ if and .IsTranslated (eq .Lang "fr") }} - - {{ if (index .AllTranslations 0).File }} - {{ if eq (index .AllTranslations 0).File.UniqueID (index .AllTranslations 1).File.UniqueID }} + + {{ if and (index .AllTranslations 0).File (index .AllTranslations 1).File }} + {{ $file0 := readFile (index .AllTranslations 0).File.Filename }} + {{ $file1 := readFile (index .AllTranslations 1).File.Filename }} + {{ if eq (sha256 $file0) (sha256 $file1) }} {{ .Scratch.Set "en_article_in_fr_site" true }} {{ end }} {{ else }}