We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6a848e9 commit 8132619Copy full SHA for 8132619
src/MudBlazorPages/wwwroot/index.html
@@ -5,7 +5,16 @@
5
<meta charset="utf-8" />
6
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
<title>MudBlazorPages</title>
8
- <base href="/" />
+
9
+ <!-- Adapted from https://stackoverflow.com/a/69769086/8435941 -->
10
+ <script>
11
+ var baseTag = document.createElement("base");
12
+ var appRoot = "/CHANGEME/";
13
+ var path = document.location.pathname;
14
+ baseTag.href = (path.indexOf(appRoot) === 0 || path + "/" === appRoot) ? appRoot : "/";
15
+ document.head.appendChild(baseTag);
16
+ </script>
17
18
<link rel="stylesheet" href="css/app.css" />
19
<link rel="icon" type="image/png" href="favicon.png" />
20
<link href="MudBlazorPages.styles.css" rel="stylesheet" />
0 commit comments