Blazor sample? #133
Replies: 2 comments 6 replies
-
I'd love to figure out tighter Blazor support at some point. Blazor WASM is client-side so it makes sense that a static generator should, in theory, be able to support that model inline with other "normal" static content and pages. That said, my understanding is that there's a lot of magic that happens in the .NET compiler to light-up Blazor support and generate both the JavaScript bootstrapping code and the assemblies for a Blazor WASM site or component. We'd need to hook into that for a tight integration. An alternative model could be similar to how I've seen Statiq used alongside ASPNET Core sites by using a single Solution with two different projects, one for Statiq and one for the ASPNET site. Then have Statiq generate it's content but set the output directory to somewhere the ASPNET site will serve from. I've even seen this model with Statiq being run in-process during app startup in the ASPNET site. At this point though, I haven't used or explored Blazor very much at all since it's very early releases. It would probably take a fair amount of R&D to figure out how best to integrate more tightly, and I'm entirely focused on releasing Statiq Docs at the moment. Something like this is definitely on the backlog though, and if you blaze a trail and figure out some good approaches, even better! |
Beta Was this translation helpful? Give feedback.
-
Hi @daveaglick, sorry for some mistakes. |
Beta Was this translation helpful? Give feedback.
-
Do you have a sample app on how to use Statiq with Blazor?
Let's say I have a Blazor WASM site that loads content via an ID, I was wondering how I could use Statiq to generate those pages? Right now, I'm thinking I could just generate the JSON and then read the content from the JSON instead, but could I go further?
I would still like to use other Blazor features for dynamic content, so I'm not sure if I can get the best of both worlds somehow.
Thoughts?
Beta Was this translation helpful? Give feedback.
All reactions