Skip to content

Commit

Permalink
Added support for query parameters when redirecting in gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
DmitriySalnikov committed Nov 6, 2024
1 parent f9cb410 commit 4006fc2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/web_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,16 @@ jobs:
<meta http-equiv="refresh" content="1; url=REDIRECT_TO_FOLDER/" />
</noscript>
<script>
window.location.replace("REDIRECT_TO_FOLDER/" + window.location.hash);
// Getting the parameters from the URL
const queryParams = new URLSearchParams(window.location.search);
const pageParam = queryParams.get("page");
// Forming the final URL using the parameter value ?page
if (pageParam) {
window.location.replace(`REDIRECT_TO_FOLDER/${pageParam}${window.location.hash}`);
} else {
window.location.replace(`REDIRECT_TO_FOLDER/${window.location.hash}`);
}
</script>
<style>
html {
Expand Down
2 changes: 1 addition & 1 deletion addons/debug_draw_3d/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Precompiled for:
This addon supports working with several World3D and different Viewports.
There is also a no depth test mode and other settings that can be changed for each instance.

This library supports double-precision builds, for more information, [see the documentation](https://dd3d.dmitriysalnikov.ru/docs/1.4.5/md_docs_2DoublePrecision.html).
This library supports double-precision builds, for more information, [see the documentation](https://dd3d.dmitriysalnikov.ru/docs/?page=md_docs_2DoublePrecision.html).

## [Interactive Web Demo](https://dd3d.dmitriysalnikov.ru/demo/)

Expand Down

0 comments on commit 4006fc2

Please sign in to comment.