replace legacy /install redirect

This commit is contained in:
Daniel Micay 2021-03-06 22:38:39 -05:00
parent 5450f94be1
commit aae0ac8edf
10 changed files with 30 additions and 12 deletions

View File

@ -164,11 +164,7 @@ http {
# mangled backlinks to /install
location = /installMinimal {
return 301 /install;
}
location = /install {
return 301 /install/cli;
return 301 /install/;
}
location = /web-install {

View File

@ -26,7 +26,7 @@
<link rel="stylesheet" href="/grapheneos.css?29"/>
<link rel="manifest" href="/manifest.webmanifest"/>
<link rel="license" href="/LICENSE.txt"/>
<script type="module" src="/js/redirect.js?10"></script>
<script type="module" src="/js/redirect.js?11"></script>
</head>
<body>
<header>

View File

@ -26,7 +26,7 @@
<link rel="stylesheet" href="/grapheneos.css?29"/>
<link rel="manifest" href="/manifest.webmanifest"/>
<link rel="license" href="/LICENSE.txt"/>
<script type="module" src="/js/redirect.js?10"></script>
<script type="module" src="/js/redirect.js?11"></script>
</head>
<body>
<header>

View File

@ -26,7 +26,7 @@
<link rel="stylesheet" href="/grapheneos.css?29"/>
<link rel="manifest" href="/manifest.webmanifest"/>
<link rel="license" href="/LICENSE.txt"/>
<script type="module" src="/js/redirect.js?10"></script>
<script type="module" src="/js/redirect.js?11"></script>
</head>
<body>
<header>

View File

@ -26,7 +26,7 @@
<link rel="stylesheet" href="/grapheneos.css?29"/>
<link rel="manifest" href="/manifest.webmanifest"/>
<link rel="license" href="/LICENSE.txt"/>
<script type="module" src="/js/redirect.js?10"></script>
<script type="module" src="/js/redirect.js?11"></script>
</head>
<body>
<header>

View File

@ -26,6 +26,7 @@
<link rel="stylesheet" href="/grapheneos.css?29"/>
<link rel="manifest" href="/manifest.webmanifest"/>
<link rel="license" href="/LICENSE.txt"/>
<script type="module" src="/js/redirect.js?11"></script>
</head>
<body>
<header>

View File

@ -26,7 +26,7 @@
<link rel="stylesheet" href="/grapheneos.css?29"/>
<link rel="manifest" href="/manifest.webmanifest"/>
<link rel="license" href="/LICENSE.txt"/>
<script type="module" src="/js/redirect.js?10"></script>
<script type="module" src="/js/redirect.js?11"></script>
<script type="module" src="/js/fastboot/dist/fastboot.min.mjs?1.0.7"></script>
<script type="module" src="/js/web-install.js?13"></script>
</head>

View File

@ -22,6 +22,27 @@ const redirects = new Map([
["/build#upgrading-to-android-10", "/build#generating-release-signing-keys"],
["/install/cli#fastboot-as-non-root", "/install/cli#flashing-as-non-root"],
["/install/web#fastboot-as-non-root", "/install/web#flashing-as-non-root"],
// preserve links to CLI install guide from when it was /install
["/install/#prerequisites", "/install/cli#prerequisites"],
["/install/#enabling-oem-unlocking", "/install/cli#enabling-oem-unlocking"],
["/install/#opening-terminal", "/install/cli#opening-terminal"],
["/install/#obtaining-fastboot", "/install/cli#obtaining-fastboot"],
["/install/#standalone-platform-tools", "/install/cli#standalone-platform-tools"],
["/install/#checking-fastboot-version", "/install/cli#checking-fastboot-version"],
["/install/#fastboot-as-non-root", "/install/cli#fastboot-as-non-root"],
["/install/#connecting-phone", "/install/cli#connecting-phone"],
["/install/#unlocking-the-bootloader", "/install/cli#unlocking-the-bootloader"],
["/install/#obtaining-signify", "/install/cli#obtaining-signify"],
["/install/#obtaining-factory-images", "/install/cli#obtaining-factory-images"],
["/install/#flashing-factory-images", "/install/cli#flashing-as-non-root"],
["/install/#troubleshooting", "/install/cli#troubleshooting"],
["/install/#locking-the-bootloader", "/install/cli#locking-the-bootloader"],
["/install/#post-installation", "/install/cli#post-installation"],
["/install/#booting", "/install/cli#booting"],
["/install/#disabling-oem-unlocking", "/install/cli#disabling-oem-unlocking"],
["/install/#replacing-grapheneos-with-the-stock-os", "/install/cli#replacing-grapheneos-with-the-stock-os"],
["/install/#further-information", "/install/cli#further-information"],
]);
function handle_hash() {

View File

@ -28,7 +28,7 @@
<link rel="manifest" href="/manifest.webmanifest"/>
<link rel="license" href="/LICENSE.txt"/>
<script type="module" src="/js/releases.js?14"></script>
<script type="module" src="/js/redirect.js?10"></script>
<script type="module" src="/js/redirect.js?11"></script>
</head>
<body>
<header>

View File

@ -26,7 +26,7 @@
<link rel="stylesheet" href="/grapheneos.css?29"/>
<link rel="manifest" href="/manifest.webmanifest"/>
<link rel="license" href="/LICENSE.txt"/>
<script type="module" src="/js/redirect.js?10"></script>
<script type="module" src="/js/redirect.js?11"></script>
</head>
<body>
<header>