ant-design-blazor/site/AntDesign.Docs/Services
jsakamoto 6c624ec06c
docs: Enable static pre-rendering on the Docs WebAssembly app (#4207)
* Add the "BlazorWasmPreRendering.Build" package reference

* Cut out the service configuration to static method

- it is required for static pre-rendering

* Specify locale for pre-rendering to 'en-US' explicitly

- otherwise, an exception, "JsonException: '<' is an invalid start of a value" will happen.
- because there aren't "*.en.json" files, there are "*.en-US.json" files.

* Avoid doing "NavigateTo" during pre-rendering

- otherwise, the "NavigationException" will happen.

* Move caches of the DemoService to an individual singleton service.

- otherwise, a disposed HttpClient object will cause the "ObjectDisposedException" on a Blazor Server
- because a static field of a scoped service captures the HttpClient object that will disposed of after that scoped service has expired.

* Make it to be pre-rendered the zh-CN locale contents too

* Fix the invalid URL in the FAQ document

- both en-US and zh-CN.
- this caused 404 Not Found and a crash during the pre-rendering process.

* Change the pre-rendering output style to '{path}/{to}.html'.

- from the '{path}/{to}/index.html' style.

* Make the description part of the component pages be included in the static pre-rendering.

- To achieve that, load a DemoComponent object in the `OnIntializedAsync` life cycle method.
- and make sure to avoid invoking `NavigationTo` in the `OnIntializedAsync` life cycle method.
2024-09-18 00:54:16 +08:00
..
CompilerService.cs docs: add monaco code view for demos (#3499) 2024-09-10 01:15:18 +08:00
ConcurrentCache.cs chore: Enable some code analyze rules (#4126) 2024-08-28 00:54:33 +08:00
DemoService.cs docs: Enable static pre-rendering on the Docs WebAssembly app (#4207) 2024-09-18 00:54:16 +08:00
DemoServiceCache.cs docs: Enable static pre-rendering on the Docs WebAssembly app (#4207) 2024-09-18 00:54:16 +08:00
IconListService.cs chore: Enable some code analyze rules (#4126) 2024-08-28 00:54:33 +08:00
MoreProps.cs chore: Enable some code analyze rules (#4126) 2024-08-28 00:54:33 +08:00
Product.cs chore: Enable some code analyze rules (#4126) 2024-08-28 00:54:33 +08:00
Recommend.cs chore: Enable some code analyze rules (#4126) 2024-08-28 00:54:33 +08:00
Sponsor.cs chore: Enable some code analyze rules (#4126) 2024-08-28 00:54:33 +08:00