Skip to content

Commit 8fa92d0

Browse files
committed
WPB-17187: adding support for full redirection along with fragment
1 parent 0083cb7 commit 8fa92d0

3 files changed

Lines changed: 4 additions & 8 deletions

File tree

.github/workflows/build.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,5 @@ jobs:
4646
aws s3 rm s3://${{ secrets.BUCKET }}/latest --recursive
4747
aws s3 sync tmp_extracted/latest s3://${{ secrets.BUCKET }}/latest
4848
49-
# will be removed in the next commit
50-
aws s3 rm s3://${{ secrets.BUCKET }}/site --recursive
51-
5249
aws s3 cp tmp_extracted/versions.json s3://${{ secrets.BUCKET }}/versions.json
5350
rm -rf tmp_extracted

.github/workflows/test.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,5 @@ jobs:
4646
aws s3 rm s3://${{ secrets.DEV_BUCKET }}/latest --recursive
4747
aws s3 sync tmp_extracted/latest s3://${{ secrets.DEV_BUCKET }}/latest
4848
49-
aws s3 rm s3://${{ secrets.DEV_BUCKET }}/site --recursive
50-
5149
aws s3 cp tmp_extracted/versions.json s3://${{ secrets.DEV_BUCKET }}/versions.json
5250
rm -rf tmp_extracted

.overrides/404.html

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,14 @@ <h1>Page moved or not found</h1>
2020
<script>
2121
(function () {
2222
const path = window.location.pathname;
23+
const hash = window.location.hash;
2324
const isVersioned = path.startsWith("/latest") || /^\/v\d/.test(path);
2425
if (!isVersioned) {
25-
const newPath = "/latest" + path;
26+
const newPath = "/latest" + path + hash;
2627
const link = document.getElementById("redirect-link");
2728
link.href = newPath;
28-
link.textContent = newPath; // Set both href and visible text
29-
//window.location.replace(newPath);
29+
link.textContent = newPath;
30+
// window.location.replace(newPath);
3031
}
3132
})();
3233
</script>

0 commit comments

Comments
 (0)