Description
Is there an existing issue for this?
- I have searched the existing issues
Is your feature request related to a problem? Please describe the problem.
When creating a new Blazor project, the current Empty templates do not include simple layout and page files for a blank homepage to start a web project. Meanwhile, the default "Blazor Server" and "Blazor WebAssembly" projects have example components, which may not be needed in some scenarios.
Describe the solution you'd like
It would be helpful to have two new templates: Blazor Server Empty Website and Blazor WebAssembly Empty Website, with the following features:
-
Blazor Server Empty Website: Similar to the current Blazor Server Empty template, but with a blank homepage file called "Index.razor" that simply says "Welcome to Index.razor". Additionally, it includes the necessary files to make the default Blazor theme, such as a "MainLayout.razor" file and related navigation and CSS files.
-
Blazor WebAssembly Empty Website: Similar to the current Blazor WebAssembly Empty template, but with a blank homepage file called "Index.razor" that simply says "Welcome to Index.razor". Additionally, it includes the necessary files to make the default Blazor theme, such as a "MainLayout.razor" file and related navigation and CSS files.
This way, users could choose the appropriate template for their needs and start with a blank slate that includes only the necessary files to get started with a new project and the default Blazor theme.
Additional context
summary that includes all the files and file locations discussed and removes any steps that are not necessary:
- Open Visual Studio and create a new Blazor WebAssembly or Blazor Server project.
- Once the project is created, navigate to the Pages folder and delete the Counter.razor and WeatherForecastService.cs files. This will remove the counter and weather example files.
- In the Shared folder, open the NavMenu.razor file and remove the code for the Counter and Weather links, as well as the SurveyPrompt component.
- In the App.razor file, remove the routing configuration for the Counter and Weather components, as well as the SurveyPrompt component.
- Navigate to the Pages folder and delete the SurveyPrompt.razor file.
- Open the Index.razor file in the Pages folder and remove any unnecessary code, keeping only the "Welcome to Index.razor" message.
- Clean up files related in Shared project folder.
- You can customize the page to suit your needs and start creating an app without any distractions.
It would be helpful to have additional templates that include only the necessary files, such as an "Empty Index" or "Index Only" template for Blazor projects. These templates should just include the blank homepage file called "Index.razor" and the necessary files to make the default Blazor theme, but without any unnecessary components or code. These templates would be useful for quick idea prototyping and testing different approaches, without the need to remove unnecessary files. The templates should be named "Blazor Server App Blank Home" and "Blazor WebAssembly App Blank Home" for easier searching.
Thanks!