From 458f170cfff1003bb9b8157b176c6b35e3674639 Mon Sep 17 00:00:00 2001 From: Lotte Pitcher Date: Tue, 25 Nov 2025 14:25:06 +0000 Subject: [PATCH 1/2] reset placeholders and port number in umbraco-extension template --- .../UmbracoExtension/Client/src/api/client.gen.ts | 2 +- templates/UmbracoExtension/Client/src/api/sdk.gen.ts | 10 +++++----- templates/UmbracoExtension/Client/src/api/types.gen.ts | 10 +++++----- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/templates/UmbracoExtension/Client/src/api/client.gen.ts b/templates/UmbracoExtension/Client/src/api/client.gen.ts index 150f953b0dd9..3340146ac96d 100644 --- a/templates/UmbracoExtension/Client/src/api/client.gen.ts +++ b/templates/UmbracoExtension/Client/src/api/client.gen.ts @@ -14,5 +14,5 @@ import type { ClientOptions as ClientOptions2 } from './types.gen'; export type CreateClientConfig = (override?: Config) => Config & T>; export const client = createClient(createConfig({ - baseUrl: 'https://localhost:44394' + baseUrl: 'https://localhost:44339' })); diff --git a/templates/UmbracoExtension/Client/src/api/sdk.gen.ts b/templates/UmbracoExtension/Client/src/api/sdk.gen.ts index 02d7101ed5bd..51722ac2fcbf 100644 --- a/templates/UmbracoExtension/Client/src/api/sdk.gen.ts +++ b/templates/UmbracoExtension/Client/src/api/sdk.gen.ts @@ -18,7 +18,7 @@ export type Options; }; -export class WebsiteClientService { +export class UmbracoExtensionService { public static ping(options?: Options) { return (options?.client ?? client).get({ security: [ @@ -27,7 +27,7 @@ export class WebsiteClientService { type: 'http' } ], - url: '/umbraco/websiteclient/api/v1/ping', + url: '/umbraco/umbracoextension/api/v1/ping', ...options }); } @@ -40,7 +40,7 @@ export class WebsiteClientService { type: 'http' } ], - url: '/umbraco/websiteclient/api/v1/whatsMyName', + url: '/umbraco/umbracoextension/api/v1/whatsMyName', ...options }); } @@ -53,7 +53,7 @@ export class WebsiteClientService { type: 'http' } ], - url: '/umbraco/websiteclient/api/v1/whatsTheTimeMrWolf', + url: '/umbraco/umbracoextension/api/v1/whatsTheTimeMrWolf', ...options }); } @@ -66,7 +66,7 @@ export class WebsiteClientService { type: 'http' } ], - url: '/umbraco/websiteclient/api/v1/whoAmI', + url: '/umbraco/umbracoextension/api/v1/whoAmI', ...options }); } diff --git a/templates/UmbracoExtension/Client/src/api/types.gen.ts b/templates/UmbracoExtension/Client/src/api/types.gen.ts index 53272759e9b8..40030b11c7eb 100644 --- a/templates/UmbracoExtension/Client/src/api/types.gen.ts +++ b/templates/UmbracoExtension/Client/src/api/types.gen.ts @@ -1,7 +1,7 @@ // This file is auto-generated by @hey-api/openapi-ts export type ClientOptions = { - baseUrl: 'https://localhost:44394' | (string & {}); + baseUrl: 'https://localhost:44339' | (string & {}); }; export type DocumentGranularPermissionModel = { @@ -159,7 +159,7 @@ export type PingData = { body?: never; path?: never; query?: never; - url: '/umbraco/websiteclient/api/v1/ping'; + url: '/umbraco/umbracoextension/api/v1/ping'; }; export type PingErrors = { @@ -182,7 +182,7 @@ export type WhatsMyNameData = { body?: never; path?: never; query?: never; - url: '/umbraco/websiteclient/api/v1/whatsMyName'; + url: '/umbraco/umbracoextension/api/v1/whatsMyName'; }; export type WhatsMyNameErrors = { @@ -205,7 +205,7 @@ export type WhatsTheTimeMrWolfData = { body?: never; path?: never; query?: never; - url: '/umbraco/websiteclient/api/v1/whatsTheTimeMrWolf'; + url: '/umbraco/umbracoextension/api/v1/whatsTheTimeMrWolf'; }; export type WhatsTheTimeMrWolfErrors = { @@ -228,7 +228,7 @@ export type WhoAmIData = { body?: never; path?: never; query?: never; - url: '/umbraco/websiteclient/api/v1/whoAmI'; + url: '/umbraco/umbracoextension/api/v1/whoAmI'; }; export type WhoAmIErrors = { From 5926d7c27341dd66c8789766d9eca0ecd27b0a2a Mon Sep 17 00:00:00 2001 From: Lotte Pitcher Date: Thu, 4 Dec 2025 13:42:18 +0000 Subject: [PATCH 2/2] add readme instructions on how to test templates locally --- templates/readme.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 templates/readme.md diff --git a/templates/readme.md b/templates/readme.md new file mode 100644 index 000000000000..a9cccbdeaef3 --- /dev/null +++ b/templates/readme.md @@ -0,0 +1,21 @@ +# Contributing to the Umbraco Templates + +If you're making changes to any of the templates in this folder, please note that installing them directly from this location to test will not work. You need to 'pack' the source into a nuget package (.nupkg) in a local folder, and install from there. + +For example, using a folder location of `c:\nuget.local`: + +``` +# Pack the templates to a local folder +dotnet pack -o "c:\nuget.local" + +# Add this folder as a local nuget source +dotnet nuget add source "c:\nuget.local" --name "local nuget" + +# Make sure you don't have the global templates installed +dotnet new uninstall Umbraco.Templates + +# Install your version of the templates, having checked/updated the name of the generated .nupkg file +dotnet new install "c:\nuget.local\Umbraco.Templates.XXXX.nupkg" +``` + +You can now test your template changes using the appropriate `dotnet new` command. \ No newline at end of file