Init
This commit is contained in:
21
content/_index.md
Normal file
21
content/_index.md
Normal file
@@ -0,0 +1,21 @@
|
||||
---
|
||||
title: "Redirecting..."
|
||||
layout: "redirect"
|
||||
---
|
||||
|
||||
<script>
|
||||
(function() {
|
||||
var supportedLangs = ['en', 'fr'];
|
||||
var defaultLang = 'en';
|
||||
var userLang = navigator.language || navigator.userLanguage;
|
||||
var langCode = userLang.split('-')[0].toLowerCase();
|
||||
var targetLang = supportedLangs.includes(langCode) ? langCode : defaultLang;
|
||||
window.location.replace('/' + targetLang + '/');
|
||||
})();
|
||||
</script>
|
||||
|
||||
<noscript>
|
||||
<meta http-equiv="refresh" content="0; url=/en/">
|
||||
</noscript>
|
||||
|
||||
<p>Redirecting... <a href="/en/">English</a> | <a href="/fr/">Français</a></p>
|
||||
Reference in New Issue
Block a user