diff --git a/_scripts/anchors.js b/_scripts/anchors.js index 8247dfc9..421d4257 100644 --- a/_scripts/anchors.js +++ b/_scripts/anchors.js @@ -4,6 +4,12 @@ { const onLoad = () => { + // redirect to /jp/ if at / + if (window.location.pathname === "/") { + window.location.href = "/jp/"; + return; + } + // for each heading const headings = document.querySelectorAll( "h1[id], h2[id], h3[id], h4[id], h5[id], h6[id]"