|
132 | 132 | <CodeBox><script src="_content/Bit.BlazorUI/scripts/bit.blazorui.js?v=@@Bit.BlazorUI.Info.Version"></script></CodeBox> |
133 | 133 | <b>Note</b>: You can only use this feature in the <BitTag Color="BitColor.TertiaryBackground">App.razor</BitTag> file, |
134 | 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. |
| 135 | + for example manually adding the version query string to the resource URLs. |
136 | 136 | </BitText> |
| 137 | + |
| 138 | + <br /> |
| 139 | + |
| 140 | + <BitAccordion Title="Optional components"> |
| 141 | + <BitText Typography="BitTypography.Body1"> |
| 142 | + <b>Automatic Resource Fingerprinting</b> |
| 143 | + <br/> |
| 144 | + The <BitLink Href="https://www.nuget.org/packages/Bit.BlazorUI.Assets/" Target="_blank">Bit.BlazorUI.Assets</BitLink> package provides two |
| 145 | + standalone components designed for automatic resource fingerprinting in the <BitTag Color="BitColor.TertiaryBackground">App.razor</BitTag> file: |
| 146 | + </BitText> |
| 147 | + |
| 148 | + <br /><br /> |
| 149 | + |
| 150 | + <BitText Typography="BitTypography.Body1"> |
| 151 | + <b>Script</b>: A drop-in replacement for the standard HTML <BitTag Color="BitColor.TertiaryBackground"><script></BitTag> tag. |
| 152 | + It automatically fingerprints the resource URL (<BitTag Color="BitColor.TertiaryBackground">src</BitTag> attribute) by |
| 153 | + calculating a hash from the actual file content, ensuring reliable cache busting and versioning. |
| 154 | + </BitText> |
| 155 | + <CodeBox><Script Src="_content/Bit.BlazorUI/scripts/bit.blazorui.js"></Script></CodeBox> |
| 156 | + <BitText Typography="BitTypography.Body1"> |
| 157 | + The result would be something like this: |
| 158 | + </BitText> |
| 159 | + <CodeBox><script src="_content/Bit.BlazorUI/scripts/bit.blazorui.js?v=sha256-Z5yBv0K89OBRVurhAVzatpp3aGXsNn00e3GzQiTq_Z4"></script></CodeBox> |
| 160 | + |
| 161 | + <br /><br /> |
| 162 | + |
| 163 | + <BitText Typography="BitTypography.Body1"> |
| 164 | + <b>Link</b>: A direct replacement for the standard HTML <BitTag Color="BitColor.TertiaryBackground"><Link></BitTag> tag. |
| 165 | + It automatically fingerprints the resource URL (<BitTag Color="BitColor.TertiaryBackground">href</BitTag> attribute) by |
| 166 | + generating a hash from the actual file content, providing consistent cache busting and version management. |
| 167 | + </BitText> |
| 168 | + <CodeBox><Link Href="_content/Bit.BlazorUI/styles/bit.blazorui.css" rel="stylesheet" /></CodeBox> |
| 169 | + <BitText Typography="BitTypography.Body1"> |
| 170 | + The result would be something like this: |
| 171 | + </BitText> |
| 172 | + <CodeBox><link href="_content/Bit.BlazorUI/styles/bit.blazorui.css?v=sha256-VI6BIGZLTtmyhn3V-4RH-Yyi0Ud3p0g5dHvByeaoZ9Y" rel="stylesheet"></CodeBox> |
| 173 | + |
| 174 | + <br /><br /> |
| 175 | + <BitText Typography="BitTypography.Body1"> |
| 176 | + <b>Note</b>: You can checkout the usages of these two components in our demo website project |
| 177 | + <BitLink Target="_blank" |
| 178 | + Href="https://github.com/bitfoundation/bitplatform/blob/develop/src/BlazorUI/Demo/Bit.BlazorUI.Demo.Server/Components/App.razor"> |
| 179 | + here |
| 180 | + </BitLink>. |
| 181 | + </BitText> |
| 182 | + </BitAccordion> |
137 | 183 | </section> |
138 | 184 |
|
139 | 185 | <FeedbackSection Url="GettingStartedPage.razor" /> |
|
0 commit comments