Skip to content

Commit 477cea1

Browse files
committed
Template fix
1 parent b550f0a commit 477cea1

5 files changed

Lines changed: 22 additions & 5 deletions

File tree

‎OutWit.Web.Templates/OutWit.Web.Templates.csproj‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
44
<PackageType>Template</PackageType>
5-
<Version>1.0.1</Version>
5+
<Version>1.0.2</Version>
66
<Title>OutWit Web Site Templates</Title>
77
<Description>Project templates for creating static websites using OutWit.Web.Framework with Blazor WebAssembly, markdown content, and SEO optimization.</Description>
88
<PackageTags>dotnet-new;templates;blazor;webassembly;static-site;markdown</PackageTags>

‎OutWit.Web.Templates/templates/outwit-web/.template.config/template.json‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
},
1313
"sourceName": "OutWit.Web.Site.Template",
1414
"preferNameDirectory": true,
15+
"primaryOutputs": [
16+
{ "path": "OutWit.Web.Site.Template.csproj" }
17+
],
1518
"symbols": {
1619
"siteName": {
1720
"type": "parameter",
@@ -108,7 +111,8 @@
108111
],
109112
"postActions": [
110113
{
111-
"actionId": "3A7C4B45-1F5D-4A30-959A-51B88E82B5D2",
114+
"actionId": "210D431B-A78B-4D2F-B762-4ED3E3EA9025",
115+
"condition": "true",
112116
"description": "Restore NuGet packages",
113117
"manualInstructions": [{ "text": "Run 'dotnet restore'" }],
114118
"continueOnError": true

‎OutWit.Web.Templates/templates/outwit-web/OutWit.Web.Site.Template.csproj‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk.Razor">
1+
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">
22

33
<PropertyGroup>
44
<TargetFramework>net10.0</TargetFramework>
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
using Microsoft.AspNetCore.Components.Web;
22
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
3+
using Microsoft.Extensions.DependencyInjection;
34
using OutWit.Web.Framework;
5+
using OutWit.Web.Site.Template;
46

57
var builder = WebAssemblyHostBuilder.CreateDefault(args);
68
builder.RootComponents.Add<App>("#app");
79
builder.RootComponents.Add<HeadOutlet>("head::after");
810

9-
builder.Services.AddOutWitWebFramework(builder.HostEnvironment.BaseAddress);
11+
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
12+
builder.Services.AddOutWitWebFramework();
1013

1114
await builder.Build().RunAsync();
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
@using System.Net.Http
2+
@using System.Net.Http.Json
3+
@using Microsoft.AspNetCore.Components.Forms
4+
@using Microsoft.AspNetCore.Components.Routing
5+
@using Microsoft.AspNetCore.Components.Web
6+
@using Microsoft.AspNetCore.Components.Web.Virtualization
7+
@using Microsoft.AspNetCore.Components.WebAssembly.Http
8+
@using Microsoft.JSInterop
9+
@using OutWit.Web.Site.Template
10+
@using OutWit.Web.Site.Template.Pages

0 commit comments

Comments
 (0)