facebook twitter hatena line email

Javascript/vue/vuepress/引越し

提供: 初心者エンジニアの簡易メモ
移動: 案内検索

docs/.vuepress/config.js

module.exports = {
  head: [
    ['script',{}, `
        var uri = new URL(window.location.href);
        if (uri.host == "hoge.web.app")) {
            setTimeout("redirect()", 0);
        }
        function redirect(){
            location.href = "ttps://hoge.example.net";
        }
    `],
  ]
}

hoge.web.appだったら、hoge.example.netへ