dotnet publish and produce a useful result for standalone appsdotnet publish and produce a useful result when hosted in ASP.NETDone
Few days before , I tried to publish it on GitHub page and it was not able to reference the files inside of
_framework folder. how ever it worked on azure when I tried using Visual Studio publish tools to publish it on azure.
can we serve this from a static server like GitHub page or GitLab Page?
Yup, in fact https://blazor-demo.github.io is a Blazor app hosted on GitHub Pages as static files.
is there any extra tweak we have to do or simply hosting all content of dist folder which will be get after running dotnet publish is enough?
let me try it again.
When tried this out I had to make a couple of tweaks. For example, I think GitHub pages ignores files/folders that start with _ by default.
Also you need to enable support for SPA patterns on GitHub pages using something like https://github.com/rafrex/spa-github-pages. See https://github.com/blazor-demo/blazor-demo.github.io for an example deployment
Thanks it worked ! 馃憤
@danroth27 Thank you for the tip regarding GitHub pages. I added it to https://learn-blazor.com/getting-started/static-hosting/. It now covers nginx/Docker, Webserver for Chrome, and GitHub Pages.
Most helpful comment
Also you need to enable support for SPA patterns on GitHub pages using something like https://github.com/rafrex/spa-github-pages. See https://github.com/blazor-demo/blazor-demo.github.io for an example deployment