mirror of
https://github.com/kubesphere/website.git
synced 2025-12-25 15:32:54 +00:00
fix: Add /en/learn and redirect to /zh/learn
Signed-off-by: lannyfu <lannyfu@kubesphere.io>
This commit is contained in:
parent
f5252efe8c
commit
fd182f3727
|
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
title: 云原生实战
|
||||
css: "scss/learn.scss"
|
||||
---
|
||||
|
|
@ -302,5 +302,16 @@ var swiperPlay = function(){
|
|||
swiperPlay();
|
||||
|
||||
window.addEventListener('resize', debounce(swiperPlay, 500));
|
||||
|
||||
var handleLangChange = function (lang, href) {
|
||||
try {
|
||||
localStorage.setItem('lang', lang)
|
||||
} catch (err) { }
|
||||
location.href = href
|
||||
}
|
||||
|
||||
if ('{{ .Language }}' === 'en') {
|
||||
handleLangChange('zh', window.location.pathname)
|
||||
}
|
||||
</script>
|
||||
{{ end }}
|
||||
23
netlify.toml
23
netlify.toml
|
|
@ -28,26 +28,3 @@
|
|||
status = 301
|
||||
force = true
|
||||
|
||||
[[redirects]]
|
||||
from = "/learn/"
|
||||
to = "/zh/learn/"
|
||||
status = 301
|
||||
force = true
|
||||
|
||||
[[redirects]]
|
||||
from = "/learn/*"
|
||||
to = "/zh/learn/*"
|
||||
status = 301
|
||||
force = true
|
||||
|
||||
[[redirects]]
|
||||
from = "/live/"
|
||||
to = "/zh/live/"
|
||||
status = 301
|
||||
force = true
|
||||
|
||||
[[redirects]]
|
||||
from = "/live/*"
|
||||
to = "/zh/live/*"
|
||||
status = 301
|
||||
force = true
|
||||
|
|
|
|||
Loading…
Reference in New Issue