From c6fa8b3b8fe082c360780be94a7a0f3237ba74e5 Mon Sep 17 00:00:00 2001 From: jeremiah-carlson Date: Thu, 7 Sep 2023 23:28:32 -0400 Subject: [PATCH] Conditional hash routing --- .github/workflows/deploy-gh-pages.yaml | 3 +++ www/src/index.jsx | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy-gh-pages.yaml b/.github/workflows/deploy-gh-pages.yaml index a980003..16d4b4b 100644 --- a/.github/workflows/deploy-gh-pages.yaml +++ b/.github/workflows/deploy-gh-pages.yaml @@ -1,6 +1,9 @@ name: deploy-gh-pages on: workflow_dispatch +env: + HASH_ROUTING: true + jobs: # Build job build: diff --git a/www/src/index.jsx b/www/src/index.jsx index 36c640b..f83159c 100644 --- a/www/src/index.jsx +++ b/www/src/index.jsx @@ -13,8 +13,10 @@ if (import.meta.env.DEV && !(root instanceof HTMLElement)) { ); } +const routerSrc = (import.meta.env['HASH_ROUTING'] == true)? hashIntegration() : null; + render(() => ( - +