Skip to content

Commit

Permalink
Interim solution with UseStaticFiles twice
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeu committed Nov 16, 2021
1 parent fa2c2c8 commit 5fb897b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion BlazoriseApp/Pages/Subdir/Index.razor
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@page "/"

<h1>Hello, world!</h1>
<DisplayHeading Color="TextColor.Primary">Hello, world!</DisplayHeading>

Welcome to your new app.

Expand Down
7 changes: 5 additions & 2 deletions BlazoriseApp/Pages/Subdir/_Host.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>BlazoriseApp</title>
<base href="~/" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" integrity="sha384-B0vP5xmATw1+K9KRQjQERJvTumQW0nPEzvF6L/Z6nronJ3oUOFUFpCjEUQouq2+l" crossorigin="anonymous">

<link href="_content/Blazorise/blazorise.css" rel="stylesheet" />
<link href="_content/Blazorise.Bootstrap/blazorise.bootstrap.css" rel="stylesheet" />
Expand All @@ -32,8 +33,10 @@
<a class="dismiss">🗙</a>
</div>

<script src="_content/Blazorise/blazorise.js"></script>
<script src="_content/Blazorise.Bootstrap/blazorise.bootstrap.js"></script>
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js" integrity="sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js" integrity="sha384-+YQ4JLhjyBLPDQt//I+STsc9iw4uQqACwlvpslubQzn4u2UU2UFM80nGisd026JF" crossorigin="anonymous"></script>

<script src="_framework/blazor.server.js"></script>
</body>
</html>
1 change: 1 addition & 0 deletions BlazoriseApp/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public void Configure (IApplicationBuilder app, IWebHostEnvironment env)
app.UseHsts();
}

app.UseStaticFiles();
app.MapWhen(context => !context.Request.Path.StartsWithSegments("/subdir"), api =>
{
api.UseRouting();
Expand Down

0 comments on commit 5fb897b

Please sign in to comment.