|
72 | 72 |
|
73 | 73 | <section class="page-section">
|
74 | 74 | <BitText Typography="BitTypography.H4" Class="subtitle">2. Namespace</BitText>
|
75 |
| - <div class="section-desc">Open the <BitTag Color="BitColor.TertiaryBackground">_Imports.razor</BitTag> |
76 |
| - file of your Blazor application and add this line:</div> |
| 75 | + <BitText Typography="BitTypography.Body1"> |
| 76 | + Open the <BitTag Color="BitColor.TertiaryBackground">_Imports.razor</BitTag> file of your Blazor application and add this line: |
| 77 | + </BitText> |
77 | 78 | <CodeBox>@using Bit.BlazorUI</CodeBox>
|
78 | 79 | </section>
|
79 | 80 |
|
80 | 81 | <section class="page-section">
|
81 | 82 | <BitText Typography="BitTypography.H4" Class="subtitle">3. Styles and Scripts</BitText>
|
82 | 83 |
|
83 | 84 | <BitText Typography="BitTypography.Body1">
|
84 |
| - Open <BitTag Color="BitColor.TertiaryBackground">App.razor</BitTag> or |
| 85 | + Open <BitTag Color="BitColor.TertiaryBackground">App.razor</BitTag> or |
85 | 86 | <BitTag Color="BitColor.TertiaryBackground">index.html</BitTag> file and add the CSS file reference:
|
86 | 87 | </BitText>
|
87 | 88 | <CodeBox><link href="_content/Bit.BlazorUI/styles/bit.blazorui.css" rel="stylesheet" /></CodeBox>
|
|
117 | 118 | </BitAccordion>
|
118 | 119 | </section>
|
119 | 120 |
|
| 121 | + <section class="page-section"> |
| 122 | + <BitText Typography="BitTypography.H4" Class="subtitle">4. Cache busting</BitText> |
| 123 | + <BitText Typography="BitTypography.Body1" Gutter> |
| 124 | + You need to make sure you've implemented a proper <b>cache busting strategy</b> for all resources mentioned above. |
| 125 | + Otherwise users will encounter issues related to cached versions of resources after you update the bit BlazorUI in your project. |
| 126 | + <br /><br /> |
| 127 | + On .NET 9 or later you can simply use the new <BitTag Color="BitColor.TertiaryBackground">@@Assets[""]</BitTag> feature to |
| 128 | + fingerprint the resource files automatically. |
| 129 | + <br /><br /> |
| 130 | + Also, bit BlazorUI has a built-in feature in order to resolve the cache issues easily. using this feature you can simply add |
| 131 | + a version query string to the url of the above resources like this: |
| 132 | + <CodeBox><script src="_content/Bit.BlazorUI/scripts/bit.blazorui.js?v=@@Bit.BlazorUI.Info.Version"></script></CodeBox> |
| 133 | + <b>Note</b>: You can only use this feature in the <BitTag Color="BitColor.TertiaryBackground">App.razor</BitTag> file, |
| 134 | + for other root files (like index.html in a WASM standalone project) you have to apply another solution, |
| 135 | + for example manually adding the version query string to the resrouce URLs. |
| 136 | + </BitText> |
| 137 | + </section> |
| 138 | + |
120 | 139 | <FeedbackSection Url="GettingStartedPage.razor" />
|
121 | 140 | </div>
|
0 commit comments