Skip to content

Commit 983da34

Browse files
Update reboot section for IIS hosting workaround (#3788)
1 parent 46c2853 commit 983da34

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

examples/Demo/Shared/wwwroot/docs/CodeSetup.md

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,15 +81,31 @@ builder.Services.AddFluentUIComponents(options =>
8181
**Reboot** is a collection of element-specific CSS changes in a single file to help kick-start building a site with the **Fluent UI Blazor** components for Blazor. It provides an elegant, consistent, and simple baseline to build upon.
8282
The library automatically includes reboot through the templates.
8383

84-
If you want to use **Reboot**, and your site is not created by using our templates, you'll need to add to your `app.razor`, `index.html` or `_Layout.cshtml` file a line that includes the stylesheet (`.css` file). This can be done by adding the following line to the `<head>` section:
84+
If you want to use **Reboot**, and your site is not created by using our templates, you'll need to add to your `App.razor`, `index.html` or `_Layout.cshtml` file a line that includes the stylesheet (`.css` file). This can be done by adding the following line to the `<head>` section:
8585

8686
```html
87-
<link href="/_content/Microsoft.FluentUI.AspNetCore.Components/css/reboot.css" rel="stylesheet" />
87+
<link href="_content/Microsoft.FluentUI.AspNetCore.Components/css/reboot.css" rel="stylesheet" />
8888
```
8989

9090
It is entirely possible to build a site without using **Reboot**. Either remove or do not add to file and it will not be used by the components.
9191

92-
_When creating a site that is hosted in a different base path,it might be necessary to remove the leading '/' from the stylesheet link._
92+
##### Reboot for IIS
93+
If you want to host your site on **IIS** and it is using a different base path, it is necessary to add manually the reboot css to your `App.razor`, `index.html` or `_Layout.cshtml` file.
94+
95+
For .NET 9:
96+
```razor
97+
<link href="@Assets["_content/Microsoft.FluentUI.AspNetCore.Components/css/reboot.css"]" rel="stylesheet" />
98+
```
99+
100+
For .NET 8:
101+
```razor
102+
<link href="_content/Microsoft.FluentUI.AspNetCore.Components/css/reboot.css" rel="stylesheet" />
103+
```
104+
105+
Also make sure to remove this line from `app.css`
106+
```css
107+
@import '_content/Microsoft.FluentUI.AspNetCore.Components/css/reboot.css';
108+
```
93109

94110
### Register Services
95111
Add the following in `Program.cs`

0 commit comments

Comments
 (0)